in reply to Time::HiRes gettimeofday producing timestamps out of order
Which OS are you on?
If you're on Windows, this is a known phenomena of that module on that platform. From the HiRes.XS:
/* If the performance counter delta drifts more than 0.5 seconds from +the * system time then we recalibrate to the system time. This means we +may * move *backwards* in time! */
In your scenario, if when then first timestamp is taken, the clock has drifted by more than half a second, then Time::HiRes 'corrects' its internal counter.
Then, when the second timestamp is taken less that half a second later, the time appears to have run backwards by up to half a second.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Time::HiRes gettimeofday producing timestamps out of order
by 1nickt (Canon) on May 06, 2016 at 13:57 UTC | |
by BrowserUk (Patriarch) on May 06, 2016 at 14:07 UTC | |
by 1nickt (Canon) on May 06, 2016 at 14:11 UTC | |
by tye (Sage) on May 06, 2016 at 19:55 UTC | |
by Anonymous Monk on May 06, 2016 at 15:32 UTC |