[Python-Dev] Drop the new time.wallclock() function?
Nadeem Vawda
nadeem.vawda at gmail.com
Wed Mar 14 02:10:46 CET 2012
On Wed, Mar 14, 2012 at 3:03 AM, Victor Stinner
<victor.stinner at gmail.com> wrote:
> I suppose that most libraries and programs will have to implement a
> similar fallback.
>
> We may merge both functions with a flag to be able to disable the
> fallback. Example:
>
> - time.realtime(): best-effort monotonic, with a fallback
> - time.realtime(monotonic=True): monotonic, may raise OSError or
> NotImplementedError
This was my suggestion - I think it's useful to have the fallback
available (since most users will want it), but at the same time we
should also cater to users who need a clock that is *guaranteed* to
be monotonic.
As an aside, I think "monotonic" is a better name than "realtime";
it conveys the functions purpose more clearly. Then we could call
the flag "strict".
Cheers,
Nadeem
More information about the Python-Dev
mailing list