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
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
Lingua non convalesco, consenesco et abolesco. -- Rule 1 has a caveat! -- Who broke the cabal?
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
|