[Python-Dev] PEP 418: Add monotonic clock

Victor Stinner victor.stinner at gmail.com
Tue Mar 27 23:02:08 CEST 2012


On 27/03/2012 20:18, Matt Joiner wrote:
> Also monotonic should either not exist if it's not available, or always
> guarantee a (artificially) monotonic value.

What do you mean by "(artificially) monotonic value"? Should Python 
workaround OS bugs by always returning the maximum value of the clock?

> Finding out that something
> is already known to not work shouldn't require a call and a faked OSError.

What do you mean? time.monotonic() is not implemented if the OS doesn't 
provide any monotonic clock (e.g. if clock_gettime(CLOCK_MONOTONIC) is 
missing on UNIX). OSError is only raised when the OS returns an error. 
There is no such "faked OSError".

Victor


More information about the Python-Dev mailing list