Review of doc changes re PEP 418.

This commit is contained in:
Georg Brandl 2012-04-30 12:50:30 +02:00
parent ce58ed3e7c
commit 514880caae
1 changed files with 35 additions and 35 deletions

View File

@ -162,24 +162,24 @@ The module defines the following functions and data items:
.. class:: clock_info .. class:: clock_info
Clock information object created by :func:`get_clock_info`. Clock information object returned by :func:`get_clock_info`.
.. attribute:: implementation .. attribute:: implementation
name of the underlying C function used to get the clock value The name of the underlying C function used to get the clock value.
.. attribute:: is_monotonic .. attribute:: is_monotonic
``True`` if the clock cannot go backward, ``False`` otherwise ``True`` if the clock cannot go backward, ``False`` otherwise.
.. attribute:: is_adjusted .. attribute:: is_adjusted
``True`` if the clock can be adjusted (e.g. by a NTP daemon), ``True`` if the clock can be adjusted (e.g. by a NTP daemon), ``False``
``False`` otherwise otherwise.
.. attribute:: resolution .. attribute:: resolution
Resolution of the clock in seconds (:class:`float`) The resolution of the clock in seconds (:class:`float`).
.. versionadded:: 3.3 .. versionadded:: 3.3
@ -206,8 +206,8 @@ The module defines the following functions and data items:
.. data:: CLOCK_MONOTONIC .. data:: CLOCK_MONOTONIC
Clock that cannot be set and represents monotonic time since some Clock that cannot be set and represents monotonic time since some unspecified
unspecified starting point. starting point.
Availability: Unix. Availability: Unix.
@ -268,9 +268,8 @@ The module defines the following functions and data items:
.. function:: get_clock_info(name) .. function:: get_clock_info(name)
Get information on the specified clock as a :class:`clock_info` object. Get information on the specified clock as a :class:`clock_info` object.
Supported clock names and the corresponding functions to read their value
Supported clock names: are:
* ``'clock'``: :func:`time.clock` * ``'clock'``: :func:`time.clock`
* ``'monotonic'``: :func:`time.monotonic` * ``'monotonic'``: :func:`time.monotonic`
@ -312,16 +311,16 @@ The module defines the following functions and data items:
.. function:: monotonic() .. function:: monotonic()
Monotonic clock, i.e. cannot go backward. It is not affected by system Return the value (in fractional seconds) of a monotonic clock, i.e. a clock
clock updates. The reference point of the returned value is undefined, so that cannot go backwards. The clock is not affected by system clock updates.
that only the difference between the results of consecutive calls is valid The reference point of the returned value is undefined, so that only the
and is a number of seconds. difference between the results of consecutive calls is valid.
On Windows versions older than Vista, :func:`monotonic` detects On Windows versions older than Vista, :func:`monotonic` detects
:c:func:`GetTickCount` integer overflow (32 bits, roll-over after 49.7 :c:func:`GetTickCount` integer overflow (32 bits, roll-over after 49.7 days).
days). It increases an internal epoch (reference time by) 2\ :sup:`32` each It increases an internal epoch (reference time by) 2\ :sup:`32` each time
time that an overflow is detected. The epoch is stored in the process-local that an overflow is detected. The epoch is stored in the process-local state
state and so the value of :func:`monotonic` may be different in two Python and so the value of :func:`monotonic` may be different in two Python
processes running for more than 49 days. On more recent versions of Windows processes running for more than 49 days. On more recent versions of Windows
and on other operating systems, :func:`monotonic` is system-wide. and on other operating systems, :func:`monotonic` is system-wide.
@ -332,21 +331,22 @@ The module defines the following functions and data items:
.. function:: perf_counter() .. function:: perf_counter()
Performance counter with the highest available resolution to measure a short Return the value (in fractional seconds) of a performance counter, i.e. a
duration. It does include time elapsed during sleep and is system-wide. clock with the highest available resolution to measure a short duration. It
The reference point of the returned value is undefined, so that only the does include time elapsed during sleep and is system-wide. The reference
difference between the results of consecutive calls is valid and is a number point of the returned value is undefined, so that only the difference between
of seconds. the results of consecutive calls is valid.
.. versionadded:: 3.3 .. versionadded:: 3.3
.. function:: process_time() .. function:: process_time()
Sum of the system and user CPU time of the current process. It does not Return the value (in fractional seconds) of the sum of the system and user
include time elapsed during sleep. It is process-wide by definition. The CPU time of the current process. It does not include time elapsed during
reference point of the returned value is undefined, so that only the sleep. It is process-wide by definition. The reference point of the
difference between the results of consecutive calls is valid. returned value is undefined, so that only the difference between the results
of consecutive calls is valid.
.. versionadded:: 3.3 .. versionadded:: 3.3