[Python-ideas] time.wallclock() or other similar stuff

Kristján Valur Jónsson kristjan at ccpgames.com
Tue Nov 2 03:27:42 CET 2010


Well, maybe all we need is the timeit module, then?  I didn't realize that we have default_timer there.

Otherwise, I'm not sure about "timer".  To me that word implies some sort of context to be timed, or action to be taken, but I'm +0 on it.

K

-----Original Message-----
From: python-ideas-bounces+kristjan=ccpgames.com at python.org [mailto:python-ideas-bounces+kristjan=ccpgames.com at python.org] On Behalf Of Steven D'Aprano
Sent: Tuesday, November 02, 2010 9:51
To: python-ideas at python.org
Subject: Re: [Python-ideas] time.wallclock() or other similar stuff
The timeit module includes:

if sys.platform == "win32":
     # On Windows, the best timer is time.clock()
     default_timer = time.clock
else:
     # On most other platforms the best timer is time.time()
     default_timer = time.time


+1 on a platform-dependent alias to time() or clock()
+1 on calling it "timer"
-0 on calling it "wall_clock"



-- 
Steven

_______________________________________________
Python-ideas mailing list
Python-ideas at python.org
http://mail.python.org/mailman/listinfo/python-ideas




More information about the Python-ideas mailing list