Boost logo

Boost :

From: Beman Dawes (bdawes_at_[hidden])
Date: 2005-02-18 17:00:53

At 07:30 PM 2/13/2005, christopher diggins wrote:

>> No, there is a very particualar problem relating to
>> QueryPerformanceCounter() on some (old?) chipsets the can cause it go
>> backwards in time and wrap after approximately 20 minutes. I reported
>> to microsoft some years ago and it was confirmed an issue. (at the time

>> only happened to me on one particualar celeron / motherboard
>> configuration). By backwards in time I mean you could call the counter
>> a loop and have a reported time earlier than one got the previous
>> iteration.
>Really? That is different than the issue documentation I found at
>;EN-US;q274323 which
>that the QueryPerformanceCounter() can jump *ahead* a few seconds. I
>if the status of the issue has changed to this new version or the
>documentation just sux.

There is another problem with QueryPerformanceCounter(); the latency (time
spent executing the call itself) varies dramatically depending on (1) the
version on Windows, and (2) which compiler was used. Why the compiler
should have a strong effect on the latency of an API call is a mystery.

John Maddock and I ran some tests several years ago, and both of us could
reproduce the effects. I recently downloaded some timing code written by
someone else, tried it with several compilers and the effect still appears
to exist with current compilers. So be careful, and be sure to test with
different versions of Windows and different compilers.


Boost list run by bdawes at, gregod at, cpdaniel at, john at