ANN: a new utility for Python developers

Erno Kuusela erno-news at erno.iki.fi
Mon Aug 20 21:33:17 EDT 2001


In article <mailman.998342851.20702.python-list at python.org>, Skip
Montanaro <skip at pobox.com> writes:

| The C library function clock(3) and the system call gettimeofday(2) measure
| two quite different things.  From "man clock" on my Mandrake system:

|     The clock() function returns an approximation of processor
|     time used by the program.

yes, but since gettimeofday() has about 10000 times more resolution
and the user time measurement on most platforms that i know of is so
unreliable/imprecise, and that you probably need to be on a quiescent
machine anyway to do profiling, this does not look like a very good
solution.

if a cycle counter - a device that measures real time - is deemed a
good thing to use on windows, it probably isn't a very important
requirement to only measure cpu time.

  -- erno



More information about the Python-list mailing list