in reply to Re^2: timestamp in milliseconds
in thread timestamp in milliseconds
I've also seen (and commented on) this, but it only happens under special circumstances.
Under normal circumstances, with reasonably up-to-date versions of Perl and Time::HiRes and an NT-based version of Windows, you should be getting much better than 1/18 second resolution. On my machine it's in the order of 60 microseconds (1/16666th of a second):
P:\test>perl -MTime::HiRes=time -wle"print time for 1 .. 20; print $Ti +me::HiRes::VERSION, ' ', 1121243012.87537 1121243012.87555 1121243012.87562 1121243012.87569 1121243012.87576 1121243012.87582 1121243012.87588 1121243012.87594 1121243012.876 1121243012.87607 1121243012.87614 1121243012.8762 1121243012.87626 1121243012.87633 1121243012.87639 1121243012.87645 1121243012.87651 1121243012.87658 1121243012.87664 1121243012.8767 1.59 5.008004
The special circumstances where the low accuracy results show up is under the debugger and in (some) evaled code. Despite spending a lot of time looking at this on 2 separate occasions, I cannot work out why Perl should produce different results under these circumstances.
|
|---|