Light Speed Socket Connections
Tim Peters
tim.one at home.com
Fri Jul 13 21:56:12 EDT 2001
[/F]
> from the Python library reference:
>
> clock()
>
> Return the current CPU time as a floating point
> number expressed in seconds. The precision, and
> in fact the very definition of the meaning of ''CPU
> time'' , depends on that of the C function of the
> same name
>
> ANSI C leaves the "era" and resolution open, and Microsoft
> has defined it as:
>
> The clock function's era begins (with a value of 0)
> when the C program starts to execute. It returns
> times measured in 1/CLOCKS_PER_SEC (which
> equals 1/1000 for Microsoft C).
Python doesn't use the MS clock() for time.clock() on Windows; it uses the
MS QueryPerformanceCounter API instead. MS clock() is approximately useless
for anything (yes, it has millisecond resolution, but is updated less than
20 times per second; while even on Win95, QueryPerformanceCounter typically
has better then microsecond resolution and updating).
More information about the Python-list
mailing list