Path: csiph.com!usenet.pasdenom.info!gegeweb.org!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail From: Marko Rauhamaa Newsgroups: comp.lang.python Subject: Re: time.monotonic() roll over Date: Thu, 04 Dec 2014 17:50:55 +0200 Organization: A noiseless patient Spider Lines: 22 Message-ID: <87vblr8lcw.fsf@elektro.pacujo.net> References: <54807cfd$0$2311$426a74cc@news.free.fr> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: mx02.eternal-september.org; posting-host="ff5cf27ef3d5b31f034d3b72bdc27a41"; logging-data="20557"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX183qBE4uGpuGV0T2e9CjSKv" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) Cancel-Lock: sha1:pEC4iHWmslIoiWMZCEQk2FhkR2c= sha1:tt0WfA334Iv+R3NXGOInuYlStco= Xref: csiph.com comp.lang.python:81913 "ast" : > 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. Also, the tone of the documentation raises a suspicion that this code might return a bad value on Windows: def fifty_days(): a = time.monotonic() time.sleep(50 * 24 * 3600) return time.monotonic() - a That is, the internal integer wrap is not guarded against between the calls to time.monotonic(), maybe. Marko