[Python-Dev] this is why we shouldn't call it a "monotonic clock" (was: PEP 418 is too divisive and confusing and should be postponed)

Kristján Valur Jónsson kristjan at ccpgames.com
Sun Apr 8 02:55:40 CEST 2012

Thank you for your veto.  Still, again for the sake of keeping track of things and such, there is this: http://en.wikipedia.org/wiki/Wall_clock_time and also my original suggestion: http://bugs.python.org/issue10278

In the end, the world shall be ruled by the nomenclaturists.


Frá: python-dev-bounces+kristjan=ccpgames.com at python.org [python-dev-bounces+kristjan=ccpgames.com at python.org] fyrir hönd Guido van Rossum [guido at python.org]
Sent: 6. apríl 2012 15:42
To: Paul Moore
Cc: Python-Dev
Efni: Re: [Python-Dev] this is why we shouldn't call it a "monotonic clock" (was: PEP 418 is too divisive and confusing and should be postponed)

I'd like to veto wall clock because to me that's the clock on my wall, i.e. local time. Otherwise I like the way this thread is going.

--Guido van Rossum (sent from Android phone)

On Apr 6, 2012 4:57 AM, "Paul Moore" <p.f.moore at gmail.com<mailto:p.f.moore at gmail.com>> wrote:
On 6 April 2012 11:12, Steven D'Aprano <steve at pearwood.info<mailto:steve at pearwood.info>> wrote:
Glyph Lefkowitz wrote:
On Apr 5, 2012, at 8:07 PM, Zooko Wilcox-O'Hearn wrote:

2. Those who think that "monotonic clock" means a clock that never jumps,
and that runs at a rate approximating the rate of real time. This is a
very useful kind of clock to have! It is what C++ now calls a "steady
clock". It is what all the major operating systems provide.

All clocks run at a rate approximating the rate of real time.  That is very
close to the definition of the word "clock" in this context.  All clocks
have flaws in that approximation, and really those flaws are the whole
point of access to distinct clock APIs.  Different applications can cope
with different flaws.

I think that this is incorrect.

py> time.clock(); time.sleep(10); time.clock()

Blame Python's use of CPU time in clock() on Unix for that. On Windows:

>>> time.clock(); time.sleep(10); time.clock()

That''s a backward compatibility issue, though - I'd be arguing that time.clock() is the best name for "normally the right clock for interval, benchmark or timeout uses as long as you don't care about oddities like suspend" otherwise. Given that this name is taken, I'd argue for time.wallclock. I'm not familiar enough with the terminology to know what to expect from terms like monotonic, steady, raw and the like.


Python-Dev mailing list
Python-Dev at python.org<mailto:Python-Dev at python.org>
Unsubscribe: http://mail.python.org/mailman/options/python-dev/guido%40python.org

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20120408/cd0bae0a/attachment.html>

More information about the Python-Dev mailing list