
15 May
2006
15 May
'06
6:19 p.m.
The problem with QueryPerformanceCounter is that QueryPerformanceFrequency is not (AFAIK) required to return the same value every time. It may be CPU clock based, and a low power CPU can vary its frequency depending on load.
No, "the frequency cannot change while the system is running." (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui...)
FWIW, I have found timeGetTime pretty reliable on Windows as a monotonic time provider. It only has 1ms resolution, though.
timeGetTime() is good but QueryPerformanceCounter() has lower overhead. Their resolution is similar tho. Philippe