thrift-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Patrick Schlangen <>
Subject AW: Re: Windows Timers - Seeking Opinions
Date Thu, 28 May 2009 18:13:01 GMT

> The "Enhanced Timer" section suggests that  
>QueryPerformanceCounter should really be constant frequency. I will  
>take another look at my code that uses it, and test it again.

the other pages state that the timer frequency changes along with the CPU frequency in some
As I understood it, QPC can use different timer sources on different systems (Windows picks
the one it thinks to be the best), and some seem to be irreliable when the CPU frequency changes
(e.g. because of SpeedStep/Cool'n'Quiet).
The danger of Windows moving the process between CPUs shouldn't be a major problem as it could
be eliminated by binding the thread to a CPU (with SetThreadAffinityMask), but the Cool'n'Quiet
thing seems to be what renders QueryPerformanceCounter useless. 

After reading the links you sent, I still think the multimedia timer (timeGetTime) is the
best thing to use although using multimedia libraries in a network client application feels
kind of strange.


View raw message