changeset: 76598:314c3faea2fb user: Victor Stinner date: Sun Apr 29 02:52:39 2012 +0200 files: Doc/library/time.rst Doc/whatsnew/3.3.rst Misc/NEWS description: Close #14309: Deprecate time.clock() Use time.perf_counter() or time.process_time() instead. diff -r 76d2e0761d18 -r 314c3faea2fb Doc/library/time.rst --- a/Doc/library/time.rst Sun Apr 29 02:41:27 2012 +0200 +++ b/Doc/library/time.rst Sun Apr 29 02:52:39 2012 +0200 @@ -136,6 +136,11 @@ :c:func:`QueryPerformanceCounter`. The resolution is typically better than one microsecond. + .. deprecated:: 3.3 + The behaviour of this function depends on the platform: use + :func:`perf_counter` or :func:`process_time` instead, depending on your + requirements, to have a well defined behaviour. + .. function:: clock_getres(clk_id) diff -r 76d2e0761d18 -r 314c3faea2fb Doc/whatsnew/3.3.rst --- a/Doc/whatsnew/3.3.rst Sun Apr 29 02:41:27 2012 +0200 +++ b/Doc/whatsnew/3.3.rst Sun Apr 29 02:52:39 2012 +0200 @@ -1188,6 +1188,9 @@ the ANSI code page anymore and to support any filename. * :issue:`13988`: The :mod:`xml.etree.cElementTree` module is deprecated. The accelerator is used automatically whenever available. +* The behaviour of :func:`time.clock` depends on the platform: use the new + :func:`time.perf_counter` or :func:`time.process_time` function instead, + depending on your requirements, to have a well defined behaviour. Deprecated functions and types of the C API diff -r 76d2e0761d18 -r 314c3faea2fb Misc/NEWS --- a/Misc/NEWS Sun Apr 29 02:41:27 2012 +0200 +++ b/Misc/NEWS Sun Apr 29 02:52:39 2012 +0200 @@ -81,6 +81,9 @@ Library ------- +- Issue #14309: Deprecate time.clock(), use time.perf_counter() or + time.process_time() instead. + - Issue #14428: Implement the PEP 418. Add time.get_clock_info(), time.perf_counter() and time.process_time() functions, and rename time.steady() to time.monotonic().