[Python-Dev] Rename time.steady(strict=True) to time.monotonic()? (original) (raw)

Victor Stinner victor.stinner at gmail.com
Sat Mar 24 00:51:39 CET 2012


time.steady() is something like:

try:  return time.monotonic() except (NotImplementError, OSError):  return time.time() Is the use of weak monotonic time so wide-spread in the stdlib that we need the 'steady()' function?  If it's just two modules then it's not worth adding it.

The Python standard library is not written to be used by Python itself, but by others. The try/except is a common pattern when applications use a monotonic clock. I suppose that quite all applications use this try/except pattern.

I don't see what is the use case requiring a is truly monotonic clock.

Victor



More information about the Python-Dev mailing list