[Python-Dev] PEP 418 is too divisive and confusing and should be postponed

Victor Stinner victor.stinner at gmail.com
Thu Apr 5 19:21:58 CEST 2012

>> > For timeout purposes in a single process, such a clock is useful.  It just
>> > isn't suitable for benchmarks, or for interprocess coordination.
>> I think it would be better if the proposed algorithm (or whatever
>> algorithm to "fix" timeouts) was implemented by the
>> application/library code using the timeout (or provided as a separate
>> library function), rather than by the clock, since the clock can't
>> know what fallback behavior the app/lib needs.
> Agreed with providing it as a separate library function.

I changed time.monotonic() to not fallback to the system clock exactly
for this reason: Python cannot guess what the developer expects, or
how the developer will use the clock.

Instead of implementing your own clock in your application, it's maybe
easier to patch your OS? I suppose that you are running on GNU/Hurd,
because I didn't find yet other OS not providing a monotonic clock :-)

If you are using an OS that doesn't provide a monotonic clock, do you
really need to implement your own in your application?


More information about the Python-Dev mailing list