Determining actual elapsed (wall-clock) time

Aahz aahz at pythoncraft.com
Sun Jul 3 19:57:45 EDT 2005


In article <3ZGdnfw6ZLlvaVvfRVn-jA at powergate.ca>,
Peter Hansen  <peter at engcorp.com> wrote:
>
>I would like to determine the "actual" elapsed time of an operation 
>which could take place during a time change, in a platform-independent 
>manner (at least across Linux/Windows machines).
>
>Using time.time() doesn't appear to be suitable, since time might jump 
>forwards or backwards at the user's whim, if the system clock is reset, 
>or when a daylight savings time change occurs.

You have to do one of two things: rely on system clock or require a
network connection (so you can call a timeserver directly).
-- 
Aahz (aahz at pythoncraft.com)           <*>         http://www.pythoncraft.com/

f u cn rd ths, u cn gt a gd jb n nx prgrmmng.



More information about the Python-list mailing list