PEP 418: Replace adjusted with adjustable in time.get_clock_info()

This commit is contained in:
Victor Stinner 2012-07-10 01:38:53 +02:00
parent 114063f6e8
commit 92347731ad
1 changed files with 5 additions and 4 deletions

View File

@ -86,8 +86,8 @@ Limitations:
* time.monotonic() and time.perf_counter() may or may not be adjusted. * time.monotonic() and time.perf_counter() may or may not be adjusted.
For example, ``CLOCK_MONOTONIC`` is slewed on Linux, whereas For example, ``CLOCK_MONOTONIC`` is slewed on Linux, whereas
``GetTickCount()`` is not adjusted on Windows. ``GetTickCount()`` is not adjusted on Windows.
``time.get_clock_info('monotonic')['adjusted']`` can be used to check ``time.get_clock_info('monotonic')['adjustable']`` can be used to check
if the monotonic clock is adjusted or not. if the monotonic clock is adjustable or not.
* No time.thread_time() function is proposed by this PEP because it is * No time.thread_time() function is proposed by this PEP because it is
not needed by Python standard library nor a common asked feature. not needed by Python standard library nor a common asked feature.
Such function would only be available on Windows and Linux. On Such function would only be available on Windows and Linux. On
@ -120,8 +120,9 @@ Return a ``time.clock_info`` object which has the following attributes:
function. Examples: ``"QueryPerformanceCounter()"``, function. Examples: ``"QueryPerformanceCounter()"``,
``"clock_gettime(CLOCK_REALTIME)"``. ``"clock_gettime(CLOCK_REALTIME)"``.
* ``monotonic`` (bool): True if the clock cannot go backward. * ``monotonic`` (bool): True if the clock cannot go backward.
* ``adjusted`` (bool): True if the clock can be adjusted (e.g. by a * ``adjustable`` (bool): ``True`` if the clock can be changed automatically
NTP daemon). (e.g. by a NTP daemon) or manually by the system administrator, ``False``
otherwise
* ``resolution`` (float): resolution in seconds of the clock. * ``resolution`` (float): resolution in seconds of the clock.