[Python-Dev] time.clock() on windows
Kristján Valur Jónsson
kristjan at ccpgames.com
Thu Oct 22 11:47:50 CEST 2009
> -----Original Message-----
> From: python-dev-bounces+kristjan=ccpgames.com at python.org
> [mailto:python-dev-bounces+kristjan=ccpgames.com at python.org] On Behalf
> Of Mark Hammond
> The thread seems to be at
> http://groups.google.com/group/comp.lang.python/browse_frm/thread/be324
> 78a4b8e77b6/816d6228119a3474
> (although I do seem to recall more discussion of the patch which I
> currently can't find). I'd be very surprised if any applications rely
> on
> the fact that each process starts counting at zero, so if someone can
> come up with a high-res counter which avoids that artifact I'd expect
> it
> could be used.
The point in question seems to be this this (from the thread):
* Need some sort of static "start value", which is set when the
process starts, so I can return to Python in seconds. An easy hack
is to set this the first time clock() is called, but then it wont
reflect any sort of real time - but would be useful for relative
times...
But the argumentation is flawed. There is an implicit "start" value (technically, CPU powerup). The point concedes that no sort of real time is returned, and so the particular "start" time chosen is immaterial.
K
More information about the Python-Dev
mailing list