Re: Determining actual elapsed (wall-clock) time
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.python archive

Re: Determining actual elapsed (wall-clock) time

From: Aahz <aahz@pythoncraft.com>
Date: Mon Jul 04 2005 - 01:57:45 CEST

In article <3ZGdnfw6ZLlvaVvfRVn-jA@powergate.ca>,
Peter Hansen <peter@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@pythoncraft.com)           <*>         http://www.pythoncraft.com/
f u cn rd ths, u cn gt a gd jb n nx prgrmmng.
Received on Thu Sep 29 16:44:12 2005