Skip to content

Commit b6a09ae

Browse files
Carreauvstinner
authored andcommitted
bpo-36895: Undocument removed time.clock (GH-13286)
1 parent b1dfcad commit b6a09ae

File tree

2 files changed

+4
-24
lines changed

2 files changed

+4
-24
lines changed

Doc/library/time.rst

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -136,30 +136,6 @@ Functions
136136
Unlike the C function of the same name, :func:`asctime` does not add a
137137
trailing newline.
138138

139-
140-
.. function:: clock()
141-
142-
.. index::
143-
single: CPU time
144-
single: processor time
145-
single: benchmarking
146-
147-
On Unix, return the current processor time as a floating point number expressed
148-
in seconds. The precision, and in fact the very definition of the meaning of
149-
"processor time", depends on that of the C function of the same name.
150-
151-
On Windows, this function returns wall-clock seconds elapsed since the first
152-
call to this function, as a floating point number, based on the Win32 function
153-
:c:func:`QueryPerformanceCounter`. The resolution is typically better than one
154-
microsecond.
155-
156-
.. availability:: Windows, Unix. Not available on VxWorks.
157-
158-
.. deprecated-removed:: 3.3 3.8
159-
The behaviour of this function depends on the platform: use
160-
:func:`perf_counter` or :func:`process_time` instead, depending on your
161-
requirements, to have a well defined behaviour.
162-
163139
.. function:: pthread_getcpuclockid(thread_id)
164140

165141
Return the *clk_id* of the thread-specific CPU-time clock for the specified *thread_id*.

Doc/whatsnew/3.8.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -788,6 +788,10 @@ The following features and APIs have been removed from Python 3.8:
788788
* The function :func:`platform.popen` has been removed, it was deprecated since
789789
Python 3.3: use :func:`os.popen` instead.
790790

791+
* The function :func:`time.clock` has been removed, it was deprecated since Python
792+
3.3: use :func:`time.perf_counter` or :func:`time.process_time` instead, depending
793+
on your requirements, to have a well defined behavior.
794+
791795
* The ``pyvenv`` script has been removed in favor of ``python3.8 -m venv``
792796
to help eliminate confusion as to what Python interpreter the ``pyvenv``
793797
script is tied to. (Contributed by Brett Cannon in :issue:`25427`.)

0 commit comments

Comments
 (0)