Determining actual elapsed (wall-clock) time

Aahz aahz at
Mon Jul 4 01:57:45 CEST 2005

In article <3ZGdnfw6ZLlvaVvfRVn-jA at>,
Peter Hansen  <peter at> 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           <*>

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

More information about the Python-list mailing list