http://qs321.pair.com?node_id=503193


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

Hi all

while reading this, I tested it on my XP (ActivePerl 5.8) and got this :

1130370142.0764
1130370142.07657
1130370142.07669
1130370142.07679
1130370142.07691
1130370142.07701
1130370142.07712
1130370142.07723
1130370142.07734
1130370142.07745

Has it maybe something to do with cygwin or have I missed something

Have a nice day

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

Replies are listed 'Best First'.
Re^3: Time::HiRes not that high on windows
by BrowserUk (Patriarch) on Oct 27, 2005 at 00:40 UTC

    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.