[ python-Bugs-1040026 ] os.times() is bogus
SourceForge.net
noreply at sourceforge.net
Mon Oct 4 18:34:36 CEST 2004
Bugs item #1040026, was opened at 2004-10-04 12:34
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1040026&group_id=5470
Category: Extension Modules
Group: Python 2.4
Status: Open
Resolution: None
Priority: 5
Submitted By: Guido van Rossum (gvanrossum)
Assigned to: Nobody/Anonymous (nobody)
Summary: os.times() is bogus
Initial Comment:
At least on Linux, all values the tuple returned by
os.times() are bogus. The code always divides the
return value from the times() system call by HZ, but
according to the man page times(2) they are in clock
ticks. The man page adds:
NOTES
The number of clock ticks per second can be
obtained using
sysconf(_SC_CLK_TCK);
In POSIX-1996 the symbol CLK_TCK (defined in
<time.h>) is mentioned as
obsolescent. It is obsolete now.
[...]
Note that clock(3) returns values of type
clock_t that are not measured
in clock ticks but in CLOCKS_PER_SEC.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1040026&group_id=5470
More information about the Python-bugs-list
mailing list