in reply to Re: Re: Time::Hires Granularity
in thread Time::Hires Granularity

As I said I am getting about 700 prints of the same time, and then the next set of lines is time+0.06
Actually, it should be closer to 0.055.

Windows' internal click gets updated 18 times a second, or once every 55ms, via a timer interrupt. The API call GetTickCount() exhibits the same behaviour as you describe here. The docs for this API call mention:

It is limited to the resolution of the system timer.
So yes, even though I haven't seen any evidence that the two phenomenons are indeed related, their symptoms are so strikingly alike, that I'm quite convinced they share the same origin. So yes, it's a Windows Thing™.

Update: I don't mean to say it cannot be fixed/patched, only that this is behaviour you'll typically only see in Windows, for this particular case.

Replies are listed 'Best First'.
Re: Re: Re: Re: Time::Hires Granularity
by BrowserUk (Patriarch) on Dec 04, 2003 at 22:58 UTC
    So yes, it's a Windows Thingâ„¢.

    I think that is a little unfair. With the appropriate patches to Time::HiRes, it's resolution could be improved markedly. Leastwise for elapsed timing if not easily for absolute timing.


    Examine what is said, not who speaks.
    "Efficiency is intelligent laziness." -David Dunham
    "Think for yourself!" - Abigail
    Hooray!
    Wanted!