[OT]: resolution of PerformanceCounter under NT

Tim Roberts timr at probo.com
Wed Jun 27 02:22:59 EDT 2001


jkn at nicorp.f9.co.uk (Jon Nicoll) wrote:

>Hello there
>    Further to my recent posting about using calldll to call the Win32
>API functions QuesryPerformanceCounter()/QueryPerformanceFrequency():
>...
>I find that I get a return value, on my Dell Precision 410 running
>NT4/SP5, of:
>
>>>> 448630000
>
>ie 448e06, which looks to me rather like the Performance counter is
>using the Timestamp Register (via the RDTSC instruction, presumably)
>running at the CPU's clock frequency (?). This surprised me, as I'm
>used to seeing a resolution of 873nSec or so.

It all depends on your HAL.  If you are running the multiprocessor HAL,
QueryPerformanceCounter does, indeed, use the RDTSC instruction as its
source.  If you are running the uniprocessor HAL, QueryPerformanceCounter
uses the 1.193MHz motherboard timer, which gives you your 873ns resolution.
I assume this was done because the multiprocessor HAL could assume a
Pentium.

It is possible to run the multiprocessor HAL on a uniprocessor system.
Some of the high-end servers run this way because the multiprocessor HAL
handles some of the more sophisticated motherboard features.
--
- Tim Roberts, timr at probo.com
  Providenza & Boekelheide, Inc.



More information about the Python-list mailing list