in reply to Re^2: Time::HiRes not that high on windows
in thread Time::HiRes not that high on windows
Wow! A rave from the grave :)
This thread relates to an very old version of Time::HiRes. Later versions use a different system API to allow much higher resolution. For further reading see thread at Perl -de1 weirdness. and particularly Re^4: Perl -de1 weirdness..
The resolution under windows is now comparable at around the 7 microsecond mark (on my machine. It will vary somewhat with the speed of your cpu). Certainly faster than a Perl script can report it.
Though the weirdness with Time::HiRes when running under the debugger persists into 5.8.6:
C:\perl5.8.6\bin>.\perl -MTime::HiRes=time -le"print time() for 1 .. 1 +0;" 1130373293.29716 1130373293.29732 1130373293.29739 1130373293.2976 1130373293.29766 1130373293.29784 1130373293.2979 1130373293.29807 1130373293.29814 1130373293.29831 C:\perl5.8.6\bin>.\perl -de1 Loading DB routines from perl5db.pl version 1.25 Editor support available. Enter h or `h h' for help, or `perldoc perldebug' for more help. main::(-e:1): 1 DB<1> use Time::HiRes 'time'; DB<2> print time(), $/ for 1 .. 10;; 1130373253.21875 1130373253.21875 1130373253.21875 1130373253.21875 1130373253.21875 1130373253.21875 1130373253.21875 1130373253.21875 1130373253.21875 1130373253.21875 DB<3> q
|
|---|