Message104369
> In Windows the high-precision counter might return different results
> on different cores in some hardware configurations (older multi-core
> processors).
More specifically: some older multi-core processors where the HAL implements QueryPerformanceCounter using the TSC from the CPU, and the HAL doesn't keep the cores in sync and QPC doesn't otherwise account for it. This is rare; frequently QPC is implemented using another source of time.
But it's true: QPC is not 100% reliable. QPC can unfortunately jump backwards (when using TSC and you switch cores), jump forwards (when using TSC and you switch cores, or when using the PCI bus timer on P3-era machines with a specific buggy PCI south bridge controller), speed up or slow down (when using TSC and not accounting for changing CPU speed via SpeedStep &c). The simple solution: give up QPC and use timeGetTime() with timeBeginPeriod(1), which is totally reliable but only has millisecond accuracy at best.
http://www.virtualdub.org/blog/pivot/entry.php?id=106
http://support.microsoft.com/default.aspx?scid=KB;EN-US;Q274323& |
|
Date |
User |
Action |
Args |
2010-04-27 21:41:48 | larry | set | recipients:
+ larry, loewis, jhylton, gregory.p.smith, jcea, pitrou, movement, eric.smith, kevinwatters, tarek, djc, karld, carljm, coderanger, durin42, eric.araujo, nirai, alex, andrix, konryd, brian.curtin, flox, DazWorrall, cool-RR, rh0dium, rcohen, dabeaz, mahmoudimus, aconrad, ysj.ray, neologix, thouis, donaldjeo |
2010-04-27 21:41:48 | larry | set | messageid: <1272404508.22.0.728667364903.issue7946@psf.upfronthosting.co.za> |
2010-04-27 21:41:46 | larry | link | issue7946 messages |
2010-04-27 21:41:46 | larry | create | |
|