PEP 418: time.get_clock_info() now returns an object

This commit is contained in:
Victor Stinner 2012-04-29 02:26:42 +02:00
parent 17b03b5db0
commit 8e4d5fcd79
1 changed files with 5 additions and 5 deletions

View File

@ -114,15 +114,15 @@ Get information on the specified clock. Supported clock names:
* ``"process_time"``: ``time.process_time()``
* ``"time"``: ``time.time()``
Return a dictionary with the following keys:
Return a ``time.clock_info`` object which has the following attributes:
* ``"implementation"`` (str): name of the underlying operating system
* ``implementation`` (str): name of the underlying operating system
function. Examples: ``"QueryPerformanceCounter()"``,
``"clock_gettime(CLOCK_REALTIME)"``.
* ``"resolution"`` (float): resolution in seconds of the clock.
* ``"is_monotonic"`` (bool): True if the clock cannot go backward.
* ``"is_adjusted"`` (bool): True if the clock is adjusted (e.g. by a
* ``is_monotonic`` (bool): True if the clock cannot go backward.
* ``is_adjusted`` (bool): True if the clock is adjusted (e.g. by a
NTP daemon).
* ``resolution`` (float): resolution in seconds of the clock.
time.monotonic()