Page 1 of 1

Using QueryPerformanceCounter?

Posted: Tue Jun 20, 2006 4:07 pm
by dmoc
This >link< argues against it.

Posted: Tue Jun 20, 2006 6:59 pm
by netmaestro
Yes, there is a reliability problem and it's acknowledged by MS. In this link they explain it and how to ensure it doesn't impact your program:

http://support.microsoft.com/default.as ... S;Q274323&

The link you posted points out the really desirable aspect of QPC - microsecond accuracy, unattainable via timeGetTime, which can only get down to millisecond precision. MS's recommended workaround is easy to implement and with it applied, QPC is pretty bulletproof, there shouldn't be any reason not to use it.

Posted: Tue Jun 20, 2006 11:04 pm
by dmoc
Thanks for the link. The info from virtualdub highlights other possible problems arising from things like speed-stepping and multi-processing. Link posted for anyone who may be unaware of these issues.