[Python-Dev] Rename time.steady(strict=True) to time.monotonic()?
Janzert
janzert at janzert.com
Sat Mar 24 03:12:51 CET 2012
On 3/23/2012 7:25 PM, Victor Stinner wrote:
[snip]
> - time.monotonic(): monotonic clock, its speed may or may not be
> adjusted by NTP but it only goes forward, may raise an OSError
> - time.steady(): monotonic clock or the realtime clock, depending on
> what is available on the platform (use monotonic in priority). may be
> adjusted by NTP or the system administrator, may go backward.
>
> time.steady() is something like:
>
> try:
> return time.monotonic()
> except (NotImplementError, OSError):
> return time.time()
>
I am surprised that a clock with the name time.steady() has a looser
definition than one called time.monotonic(). To my mind a steady clock
is by definition monotonic but a monotonic one may or may not be steady.
Janzert
More information about the Python-Dev
mailing list