Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re: Time::HiRes not that high on windows

by jdtoronto (Prior)
on Sep 08, 2003 at 15:38 UTC ( [id://289795]=note: print w/replies, xml ) Need Help??


in reply to Time::HiRes not that high on windows

Resolution in the Windows system is limited. Generally speaking no better than 1ms no matter what you do. THis is due to the way Windows actually manages time in the PC hardware.

*nix variants on PC hardware handle it very differently.

There were a number of discussions a year or so back centered around some physiological event timing using the DJGPP compiler. This may explain the problem further but sadly I don't think it will offer a solution.

There is some discussion here http://www.codeproject.com/csharp/highresclock.asp about higher resolution - to 100ns - I have never tried the technique or investigated it further. jdtoronto

  • Comment on Re: Time::HiRes not that high on windows

Replies are listed 'Best First'.
Re^2: Time::HiRes not that high on windows (ticks)
by tye (Sage) on Sep 08, 2003 at 16:27 UTC

    Windows uses 'ticks' of between 10ms and 100ms (varies among versions). If you want higher resolution timing, then you can use the high-resolution timer [via QueryPerformanceFrequency() and QueryPerformanceCounter()] or a multimedia timer. I've not seen interfaces to either of these from Perl, however.

                    - tye

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://289795]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (4)
As of 2024-04-20 08:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found