Beefy Boxes and Bandwidth Generously Provided by pair Networks RobOMonk
laziness, impatience, and hubris
 
PerlMonks  

Re^3: In search of a bug in Time::HiRes on Windows.

by fglock (Vicar)
on Jun 16, 2005 at 03:35 UTC ( #467155=note: print w/ replies, xml ) Need Help??


in reply to Re^2: In search of a bug in Time::HiRes on Windows.
in thread In search of a bug in Time::HiRes on Windows.

with 1..10000 I get:

1.2 1118892950.89816 1118892950.90818


Comment on Re^3: In search of a bug in Time::HiRes on Windows.
Download Code
Re^4: In search of a bug in Time::HiRes on Windows.
by BrowserUk (Pope) on Jun 16, 2005 at 03:54 UTC

    As with ikegami above, you are running with a very old version (1.2) of Time::HiRes. To get better resolution, you will need to install 1.53 or later. For the purposes of tracking down the bug I think I have found, it would be useful to me if you would perform the following three steps:

    1. Install v1.53 or later (but don't run (n)make test).

      I have a zip that contains the required files for 1.59 I can email if that is more convenient.

    2. Having installed ( but not run the test suite ), re-run the test program from the OP.

      If you immediately see much higher resolution (differences between successive output in 10s of microseconds rather than 100s of milliseconds) results, stop there (but inform me please :).

      My speculation is that an extra step is required beyond just installing and using Time::HiRes (>1.53), in order for the high performance timer code to become enabled.

    3. If you do not immediately see better resolution. /Msg me and I'll give you the program that I think will enable HPC code in T::HR.

    The problem with this is that once the HPC code is enabled, I have not been able to revert to the non-enabled state. It appears that some action is required to enable the HPC code, but once it has been enabled it remains enabled across reboots. (I haven't tried a re-install!).

    Thanks for your help.


    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".
    The "good enough" maybe good enough for the now, and perfection maybe unobtainable, but that should not preclude us from striving for perfection, when time, circumstance or desire allow.

      This is what I got (with NT/5.8.0):

      # original version: H:\temp>perl x.pl 1.2 # with the new library: H:\temp>perl -Ilib x.pl 1.49 # I modified the program to accept a parameter # and tried again H:\temp>perl -Ilib x.pl 10 1.49 - 10 times # this only happened once! H:\temp>perl x.pl 10 1.2 - 10 times 1118932187.88553 1118932187.94562 1118932188.0057 1118932188.06579 1118932188.13589 H:\temp>perl -Ilib x.pl 10 1.49 - 10 times # then tried again a few times H:\temp>perl x.pl 10 & perl -Ilib x.pl 10 1.2 - 10 times 1.49 - 10 times

      With "100", sometimes I get output in version 1.2, sometimes not; there is no output in version 1.49

      With "1000", I got output in both versions.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (10)
As of 2014-04-18 09:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (465 votes), past polls