ANN: a new utility for Python developers

Tom tom-list at
Mon Aug 20 05:35:44 CEST 2001

> [Thomas]
> >>> ...
> >>> - For timing, the clock() call in the windows CRT yields rather
> >>>   innacurate data, so I had to use a Win32 call.
> [Tim]
> >> Note that *Python's* time.clock() on Windows uses the Win32
> >> QueryPerformanceCounter() call, which has better than microsecond
> >> resolution on virtually all Windows boxes.
> [Thomas]
> > Yup, that's the call I'm using.  But initially I tried using the
> > CRT clock() function (I seem to remember that this is the function
> > used by the Python profiler).
> I don't understand.  The Python profiler is written in Python, and uses
> Python's time.clock(); it couldn't use a random C library function even if
> it wanted to.  Python's time.clock() did call the msvcrt clock() on
> until early 1997, but has used QueryPerfomanceCouter() since then (ironic:
> except on Win64!  QueryPerformanceCounter hadn't yet been implemented for
> Win64 when Trent Mick did that port).


I had thought the Python profiler was written partly in C.  Guess not.


 Posted Via Premium Usenet Newsgroup Services

More information about the Python-list mailing list