[Python-Dev] PEP 418: Add monotonic clock
Victor Stinner
victor.stinner at gmail.com
Tue Mar 27 19:55:16 CEST 2012
> The clock does jump forward when the system suspends. At least some
> existing implementations of steady_clock in C++ already have this problem,
> and I think they all might.
> ....
> Time with respect to power management state changes is something that the
> PEP should address fully, for each platform.
I don't think that Python should workaround OS issues, but document
them correctly. I started with this sentence for time.monotonic():
"The monotonic clock may stop while the system is suspended."
I don't know exactly how clocks behave with system suspend. Tell me if
you have more information.
> (<https://developer.apple.com/library/mac/#qa/qa1340/_index.html>,
> <http://msdn.microsoft.com/en-us/library/aa394362.aspx>,
> <http://upower.freedesktop.org/docs/UPower.html#UPower::Sleeping>).
I will read these links and maybe add them to the PEP.
Victor
More information about the Python-Dev
mailing list