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)

2012年4月06日 15:30:24 -0700

On 06Apr2012 17:07, Kristj�n Valur J�nsson <[email protected]> wrote:
| Steven D'Aprano:
| > I think that this is incorrect.
| > py> time.clock(); time.sleep(10); time.clock()
| > 0.41
| > 0.41
|
| This is the original reason for the original defect (issue 10278)
| unix' clock() doesn't actually provide a clock in this sense, it provides a 
resource usage metric.
Yeah:-( Its help says "Return the CPU time or real time since [...]".
Two very different things, as demonstrated. I suppose neither goes
backwards, but this seems like a classic example of the "useless
monotonic clock" against which Greg Ewing railed.
And why? For one thing, because one can't inspect its metadata to find
out what it does.
-- 
Cameron Simpson <[email protected]> DoD#743
http://www.cskk.ezoshosting.com/cs/
Tens of thousands of messages, hundreds of points of view. It was not called
the Net of a Million Lies for nothing. - Vernor Vinge, _A Fire Upon The Deep_
_______________________________________________
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to