Anomaly in time.clock()

John Machin sjmachin at lexicon.net
Wed Mar 19 16:23:20 EDT 2008


On Mar 19, 11:17 pm, Godzilla <godzillais... at gmail.com> wrote:
> Hi John,
>
> I am using time.clock to calculate the elapsed time. Below is an
> example of what I was trying to do:
>
> import time
> import thread

Silly me, not being able to infer that from your initial post!

[snip]
>
> But the time.clock() sometimes return a value of between -3.5 to -4.5
> seconds backward. Note that not all computers are behaving the same. I
> have not experience the same problem with the computer at home.

Same "service pack" number?

Your code "worked" (no time warp) for me on a single-core AMD Turion64
CPU running (32 bit) Windows XP Service Pack 2 Build 2600. Maybe the
ones that "fail" have dual-core CPUs.





More information about the Python-list mailing list