[Python-Dev] Drop the new time.wallclock() function?
Lennart Regebro
regebro at gmail.com
Wed Mar 14 18:42:41 CET 2012
On Wed, Mar 14, 2012 at 10:16, Antoine Pitrou <solipsis at pitrou.net> wrote:
> That's a rather awful name. time.time() is *the* real time.
>
> time.monotonic(fallback=False) would be a better API.
I think calling the function "monotonic" isn't really a good name if
it's not always monotonic.
time.monotonic(fallback=False)
Really just means
time.monotonic(monotonic=False)
And
time.monotonic(strict=True)
Really means
time.monotonic(i_really_mean_it=True)
This is potentially confusing. Therefore
time.clock()
time.time()
time.realtime()
time.wallclock()
Are all better options if there is a flag to switch if it's monotonic or not.
Since time.clock() apparently can mean different things on different
platforms because of it's use of the C-API, we can't use that.
I'm not sure why time.time() would differ from time.realtime().
time.time() is per definition not monotonic, but
time.time(monotonic=True)
is maybe a possibility?
//Lennart
//Lennart
More information about the Python-Dev
mailing list