Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 687a17d

Browse files
committed
Revise the description of time.clock() so that it correctly describes the
Windows version of the function as well as the Unix flavor. This fixes SF bug #441357.
1 parent 63a4740 commit 687a17d

1 file changed

Lines changed: 11 additions & 5 deletions

File tree

Doc/lib/libtime.tex

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -126,12 +126,18 @@ \section{\module{time} ---
126126
\end{funcdesc}
127127

128128
\begin{funcdesc}{clock}{}
129-
Return the current processor time as a floating point number expressed in
129+
On \UNIX, return
130+
the current processor time as a floating point number expressed in
130131
seconds. The precision, and in fact the very definition of the meaning
131-
of ``processor time''\index{CPU time}\index{processor time}, depends on
132-
that of the C function of the same name, but in any case, this is the
133-
function to use for benchmarking\index{benchmarking} Python or timing
134-
algorithms.
132+
of ``processor time''\index{CPU time}\index{processor time}, depends
133+
on that of the C function of the same name, but in any case, this is
134+
the function to use for benchmarking\index{benchmarking} Python or
135+
timing algorithms.
136+
137+
On Windows, this function returns the nearest approximation to
138+
wall-clock time since the first call to this function, based on the
139+
Win32 function \cfunction{QueryPerformanceCounter()}. The resolution
140+
is typically better than one microsecond.
135141
\end{funcdesc}
136142

137143
\begin{funcdesc}{ctime}{\optional{secs}}

0 commit comments

Comments
 (0)