in reply to Re^5: Time::HiRes sleep does not always work
in thread Time::HiRes sleep does not always work

The "Good" machine that I tried above wasn't the original one that my testing was done on because that colleague wasn't at work yesterday but I got to run the test today and the results from that test are below

Counter changes 14318180 times/second QPC: 4512760987142 QPC: 4512760987382 QPC: 4512760987508 QPC: 4512760987617 QPC: 4512760987726 QPC: 4512760987835 QPC: 4512760987939 QPC: 4512760988043 QPC: 4512760988148 QPC: 4512760988253 GToD: 1219217113.05580000 GToD: 1219217113.05580000 GToD: 1219217113.05580000 GToD: 1219217113.05580000 GToD: 1219217113.05580000 GToD: 1219217113.05580000 GToD: 1219217113.05580000 GToD: 1219217113.05580000 GToD: 1219217113.05580000 GToD: 1219217113.05580000 Time: 1219217113.05580000 Time: 1219217113.05580000 Time: 1219217113.05580000 Time: 1219217113.05580000 Time: 1219217113.05580000 Time: 1219217113.05580000 Time: 1219217113.05580000 Time: 1219217113.05580000 Time: 1219217113.05580000 Time: 1219217113.05580000

I'm going to try and reinstall my Time::HiRes anyway to to make sure the problem isn't there

Replies are listed 'Best First'.
Re^7: Time::HiRes sleep does not always work
by BrowserUk (Patriarch) on Aug 20, 2008 at 08:53 UTC

    Very strange. The hardware is capable of high resolution as evidenced by the QPC: output.

    And Time::HiRes has the code to utilise that capability, but from the evidence of the gettimeofday() & time() output, that code is not being exercised.

    It's like something is caching the value, or some set of build options was used when the code was compiled to cause it to bypass the code? Did you say this was an AS built Perl?


    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.

      I think your earlier idea of the problem being with my installation of Time::HiRes is correct. I just reinstalled it and now in my orginal test I'm getting 0 matches. I also re-ran the piece of code from jethro and where previously I was only getting different times when the loop was running 9000 times or more I'm now getting new times with as little as 5 or 6 loops.

      I have no idea how to managed to figure this out but thanks for your help