ANN: a new utility for Python developers

Skip Montanaro skip at
Mon Aug 20 23:25:50 CEST 2001

    Erno> In article <mailman.998259031.17203.python-list at>, "Tim
    Erno> Peters" < at> writes:

    Erno> | The Python profiler is written in Python, and uses Python's
    Erno> | time.clock()

    Erno> mouldn't it be better to use something with a little more
    Erno> resolution on non-win32 platforms, like gettimeofday() ?

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.

>From "man gettimeofday":

       gettimeofday  and settimeofday can set the time as well as
       a timezone. 

Skip Montanaro (skip at

More information about the Python-list mailing list