[Twisted-Python] Re: Twisted-Python Digest, Vol 21, Issue 39

Paul G paul-lists at perforge.com
Sat Dec 31 16:02:31 EST 2005

----- Original Message ----- 
From: "Jean-Paul Calderone" <exarkun at divmod.com>
To: "Twisted general discussion" <twisted-python at twistedmatrix.com>
Sent: Saturday, December 31, 2005 2:52 PM
Subject: Re: [Twisted-Python] Re: Twisted-Python Digest, Vol 21, Issue 39

> On Sat, 31 Dec 2005 14:23:55 -0500, Michael Schneider 
> <michaelschneider at fuse.net> wrote:
>>On Windows, you might use time.clock() it is more precise (keep with 
>>time.time on UNIX
> Unfortunately, it wraps around after ~40 days, making it unsuitable for 
> use tracking long periods of time.  It is probably possible > to build a 
> usable timer on top of this using a wrap-around counter, but afaik no one 
> has yet attempted this.

it's actually slightly less than 50 days. time.clock() is not usable on 
windows, i think, without being able to determine its frequency (you need to 
be able to do QueryPerformanceFrequency() iirc). there's a right way to do 
this (although the api may not be available from python/pywin32), i just 
can't remember (i'm not very clueful when it comes to windows and whatever 
experience i had was a long time ago). i'll sleep on it and see if i can 
remember it in the morning.


More information about the Twisted-Python mailing list