ANN: a new utility for Python developers

Erno Kuusela erno-news at
Tue Aug 21 11:17:01 CEST 2001

In article <mailman.998368890.32346.python-list at>, Skip
Montanaro <skip at> writes:

| I think you're missing the point.  It doesn't matter if gettimeofday is tied
| to an atomic clock at NIST.  It's measuring the wrong quantity.

there is only a difference if the machine is doing something else at
the same time or blocking. the former is easy to avoid and the latter
is easy to make out in the profiler output.

in exchange you get 10000 times as good resolution.

| Perhaps not, but Python is striving to present a time module this provides
| some cross-platform semantic consistency.  time.time is there to measure
| wall clock time.  Making time.clock measure CPU time on one platform and
| wall clock time on another makes it worthless unless you know the details of
| the various systems at your disposal (and if you ever want to distribute
| applications, to the various systems at your clients' disposal).

time.clock() already measures cpu time on one platform (badly, on
unix) and wall clock time on another (windows), no?

okay, not strictly wall clock time but cpu clock cycles.  but
still something that doesn't stop running when you block or something
else runs.

  -- erno

More information about the Python-list mailing list