[Python-Dev] Drop the new time.wallclock() function? (original) (raw)
Kristján Valur Jónsson kristjan at ccpgames.com
Wed Mar 14 07:32:29 CET 2012
- Previous message: [Python-Dev] Drop the new time.wallclock() function?
- Next message: [Python-Dev] Drop the new time.wallclock() function?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
To quote: "On Unix, return the current processor time as a floating point number expressed in seconds. The precision, and in fact the very definition of the meaning of "processor time", depends on that of the C function of the same name,"
The problem is that it is defined to return "processor time." This is historical baggage that comes from just writing a python wrapper around the unix "clock" function. Of course, "processor time" is quite useless when one is trying to write timeout algorithms or other such things that need to time out in real time, not just cpu cycles. K
-----Original Message----- From: python-dev-bounces+kristjan=ccpgames.com at python.org [mailto:python-dev-bounces+kristjan=ccpgames.com at python.org] On Behalf Of Jeffrey Yasskin Sent: 13. mars 2012 22:42 To: Michael Foord Cc: Python Dev Subject: Re: [Python-Dev] Drop the new time.wallclock() function?
Isn't the highest resolution cross platform measure of "wallclock" time spelled "time.clock()"? Its docs say "this is the function to use for benchmarking Python or timing algorithms", and it would be a shame to add and teach a new function rather than improving clock()'s definition.
Jeffrey
Python-Dev mailing list Python-Dev at python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/kristjan%40ccpgames.com
- Previous message: [Python-Dev] Drop the new time.wallclock() function?
- Next message: [Python-Dev] Drop the new time.wallclock() function?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]