[Python-bugs-list] [ python-Bugs-579208 ] time.clock() goes negative
noreply@sourceforge.net
noreply@sourceforge.net
Tue, 09 Jul 2002 14:32:14 -0700
Bugs item #579208, was opened at 2002-07-09 18:06
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=579208&group_id=5470
Category: Extension Modules
Group: Python 2.2.1
>Status: Closed
>Resolution: Invalid
Priority: 5
Submitted By: Nigel W Moriarty (nwmoriarty)
Assigned to: Nobody/Anonymous (nobody)
Summary: time.clock() goes negative
Initial Comment:
The attached script demonstrates that time.clock() goes
negative after about 2147 seconds or about 36 minutes.
This happens on Linux, OSF Alpha and SGI boxes. After
the result of time.clock() goes negative it continues to
increase (get less negative) as the process continues.
Nigel
----------------------------------------------------------------------
Comment By: Neil Schemenauer (nascheme)
Date: 2002-07-09 18:34
Message:
Logged In: YES
user_id=35752
I don't think this is a bug. My manual page for the clock
function says:
The C standard allows for arbitrary values at the
start of
the program; subtract the value returned from a
call to
clock() at the start of the program to get maximum
porta-
bility.
Note that the time can wrap around. On a 32bit
system
where CLOCKS_PER_SEC equals 1000000 this function
will
return the same value approximately every 72 minutes.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=579208&group_id=5470