Using QueryPerformanceCounter?

Everything else that doesn't fall into one of the other PB categories.
dmoc
Enthusiast
Enthusiast
Posts: 739
Joined: Sat Apr 26, 2003 12:40 am

Using QueryPerformanceCounter?

Post by dmoc »

This >link< argues against it.
User avatar
netmaestro
PureBasic Bullfrog
PureBasic Bullfrog
Posts: 8451
Joined: Wed Jul 06, 2005 5:42 am
Location: Fort Nelson, BC, Canada

Post 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.
BERESHEIT
dmoc
Enthusiast
Enthusiast
Posts: 739
Joined: Sat Apr 26, 2003 12:40 am

Post 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.
Post Reply