[Python-Dev] Drop the new time.wallclock() function?

Victor Stinner victor.stinner at gmail.com
Thu Mar 15 01:56:40 CET 2012


> I merged the two functions into one function: time.steady(strict=False).

I opened the issue #14309 to deprecate time.clock():
http://bugs.python.org/issue14309
time.clock() is a different clock type depending on the OS (Windows vs
UNIX) and so is confusing. You should now decide between time.time()
and time.steady().
time.time():
 - known starting point, Epoch (1970年1月1日)
 - may be update by the system (and so go backward or forward)
=> display time to the user, compare/set file modification time
time.steady():
 - unknown starting point
 - more accurate than time.time()
 - should be monotonic (use strict=True if you want to be sure ;-))
=> benchmark, timeout
Victor


More information about the Python-Dev mailing list

AltStyle によって変換されたページ (->オリジナル) /