in reply to Time::HiRes (un)reliability in Windows/Cygwin ??
The way I read the (uncut) man page quote leads me to believe the mentioned drift only occurs when "adjusting the system clock (either manually or by services like ntp)".
At I ran the following code:
perl -le"use Time::HiRes qw( time ); print time while <>
I pressed enter at 4:39:00, 4:44:00 and 4:56:00.
1185395940.27216 1185396239.78586 1185396960.49883
Time 1 and Time 2:
Clock time difference: 300 seconds
HiRes time difference: 299.5137 seconds
Drift: 0.09726 HiRes second per Clock minute
Time 1 and Time 3:
Clock time difference: 1020 seconds
HiRes time difference: 1020.22667 seconds
Drift: 0.01333 HiRes second per Clock minute
You mentioned a drift of 0.5 HiRes second per Clock minute. I am simply not seeing that. The error is surely due to the variance in my response time.
By the way, old versions of Time::HiRes (< 1.53) had notorisouly bad resolution on Windows. Are you using something recent?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Time::HiRes (un)reliability in Windows/Cygwin ??
by graff (Chancellor) on Jul 25, 2007 at 22:38 UTC | |
by almut (Canon) on Jul 26, 2007 at 00:19 UTC |