I am calling the win/sdk function QueryPerformanceCounter to do timing -- how is
it in some cases that over 2 calls over time that the call in the future has a
lesser value than the one in the past so
start = QueryPerformanceCounter
::: wait some time
finish = QueryPerformanceCounter
then the value of
finish - start
is less than zero -- is this possible?
- Proposed as answer by Chuck Walbourn - MSFTMicrosoft employee Friday, January 11, 2013 8:16 PM
If the RDTSC count isn't monotonically increasing on a single-CPU machine, then that's a pretty nasty hardware bug. Of course, you still have to cope with 32-bit rollover on x86 CPUs.
- Edited by Chuck Walbourn - MSFTMicrosoft employee Monday, January 14, 2013 8:38 PM