PEP 418: time.get_clock_info() may provide more information (accuracy, is_adjusted)
This commit is contained in:
parent
403a3a9778
commit
6d6819334c
21
pep-0418.txt
21
pep-0418.txt
|
@ -201,20 +201,27 @@ Pseudo-code::
|
|||
time.get_clock_info(name)
|
||||
-------------------------
|
||||
|
||||
Get information on the specified time function as a dictionary. Only the following
|
||||
names are accepted:
|
||||
Get information on the specified clock. Supported clocks:
|
||||
|
||||
* "clock": time.clock()
|
||||
* "highres": time.highres()
|
||||
* "monotonic": time.monotonic()
|
||||
* "time": time.time()
|
||||
|
||||
The following keys are always present:
|
||||
Return a dictionary with the following keys:
|
||||
|
||||
* "function" (str): name of the underlying operating system function (ex:
|
||||
"QueryPerformanceCounter()" or "clock_gettime(CLOCK_REALTIME)")
|
||||
* "resolution" (float): resolution in seconds of the function
|
||||
* "is_monotonic" (bool): True if the clock is monotonic
|
||||
* Mandatory keys:
|
||||
|
||||
* "function" (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
|
||||
|
||||
* Optional keys:
|
||||
|
||||
* "accuracy" (float): accuracy in seconds of the clock
|
||||
* "is_adjusted" (bool): True if the clock can be adjusted (e.g. by a NTP
|
||||
daemon)
|
||||
|
||||
|
||||
Hardware clocks
|
||||
|
|
Loading…
Reference in New Issue