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

Victor Stinner victor.stinner at gmail.com
Thu Mar 15 10:29:26 CET 2012


2012/3/15 Matt Joiner <anacrolix at gmail.com>:
> Victor, I think that steady can always be monotonic, there are time sources
> enough to ensure this on the platforms I am aware of. Strict in this sense
> refers to not being adjusted forward, i.e. CLOCK_MONOTONIC vs
> CLOCK_MONOTONIC_RAW.

I don't think that CLOCK_MONOTONIC is available on all platforms.
clock_gettime() and QueryPerformanceFrequency() can fail. In practice,
it should not fail on modern OSses.

But if the monotonic clock fails, Python should use another less
stable clock but provide something. Otherwise, each project would have
to implement its own fallback.

Victor


More information about the Python-Dev mailing list