time.monotonic() roll over

Ian Kelly ian.g.kelly at gmail.com
Thu Dec 4 14:29:51 EST 2014


On Thu, Dec 4, 2014 at 11:09 AM, Marko Rauhamaa <marko at pacujo.net> wrote:
>
> Chris Angelico <rosuav at gmail.com>:
>
> > It's not a Python issue. Python can't do anything more than ask the
> > system, and if the system's value rolls over several times a year,
> > Python can't magically cure that. The information has already been
> > lost.
>
> Sure it could by having an invisible background thread occasionally call
> time.monotonic(). It could even be done on the side without a thread.
>
> Anyway, the idea of a clock is complicated:
>
>  * the program could be stopped by a STOP signal
>
>  * the program could be suspended from power management
>
>  * the program could be resurrected from a virtual machine snapshot
>
>  * the program could be migrated from a different physical machine

This seems like a lot of effort to unreliably design around a problem that
will matter to only a tiny fraction of users.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20141204/06c8bd9e/attachment.html>


More information about the Python-list mailing list