Calculating Elapsed Time
Peter Hansen
peter at engcorp.com
Wed Dec 7 10:43:05 EST 2005
malv wrote:
> "Note that even though the time is always returned as a floating point
> number, not all systems provide time with a better precision than 1
> second." says the doc.
> Can anything be said about precision if indeed your system returns
> figures after the decimal point?
A few things.
1. "Precision" is probably the wrong word there. "Resolution" seems
more correct.
2. If your system returns figures after the decimal point, it probably
has better resolution than one second (go figure). Depending on what
system it is, your best bet to determine why is to check the
documentation for your system (also go figure), since the details are
not really handled by Python. Going by memory, Linux will generally be
1ms resolution (I might be off by 10 there...), while Windows XP has
about 64 ticks per second, so .015625 resolution...
-Peter
More information about the Python-list
mailing list