On Fri, Dec 5, 2014 at 3:05 AM, Ian Kelly <ian.g.ke...@gmail.com> wrote: > On Dec 4, 2014 8:56 AM, "Marko Rauhamaa" <ma...@pacujo.net> wrote: >> >> "ast" <nom...@invalid.com>: >> >> > Does any body know when time.monotonic() rolls over ? >> >> Never, according to the documentation you linked. >> >> Admittedly, the documentation confuses the reader by chatting about some >> irrelevant internal Windows details. > > Not entirely irrelevant. The implication is that if you go more than 49 days > without calling the function on old Windows systems, rollovers could be > missed, which is good to know about. The result would still be monotonic, > but it wouldn't accurately reflect the time elapsed.
I don't know for sure about the newer Windowses, but I believe they use a 64-bit counter instead of the 32-bit one used in previous versions, so even if they do roll over, there'll be a much MUCH longer time scale involved. Even if it stores time in nanoseconds, a 64-bit counter would allow for hundreds of years between rollovers, which is reasonably safe - much better than the month-and-a-bit of older ones, which is shorter than quite a lot of my programs' uptimes. Hence the lack of information about them; you don't have to worry. (Likewise on Unix-derived systems, I believe, and for the same reason.) ChrisA -- https://mail.python.org/mailman/listinfo/python-list