Calculating Elapsed Time

Peter Hansen peter at engcorp.com
Wed Dec 7 13:01:00 EST 2005


Fredrik Lundh wrote:
> Peter Hansen wrote:
>>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...
> 
[snip script]
> if I run this on the Windows 2K box I'm sitting at right now, it settles
> at 100 for time.time, and 1789772 for time.clock.  on linux, I get 100
> for time.clock instead, and 262144 for time.time.

For the record, the WinXP box I'm on is also 100 for time.time.  Which 
is quite odd, as I have a distinct memory of us having done the above 
type of measurement before and having had it come out at 64.  Colour me 
puzzled.

-Peter




More information about the Python-list mailing list