Does the PC have a counter with a frequency greater than the *lpFrequency the void QueryPerformanceFrequency function (LARGE_INTEGER *lpFrequency )? And how to contact him if he exists?

    1 answer 1

    The thinnest counter is the TSC (Time Stamp Counter). Read instruction rdtsc (examples google).

    It should be noted here that in multiprocessor systems TSC counters of different processors can be unsynchronized (in the case of SMP they are unsynchronized by definition).

    In your case, the QueryPerformanceFrequency will most likely be the best solution.

    • Thank. Are there any thin counters available for C ++ functions? - BuilderC
    • GetTickCount / GetTickCount64 - nitrocaster
    • +1, did not know about rdtsc . - VladD