PEP 418: Cleanup the Process Time table
This commit is contained in:
parent
e7dd82585b
commit
b6f2709957
39
pep-0418.txt
39
pep-0418.txt
|
@ -77,7 +77,7 @@ is not planned for removal.
|
|||
Python functions
|
||||
================
|
||||
|
||||
New functions
|
||||
New Functions
|
||||
-------------
|
||||
|
||||
time.get_clock_info(name)
|
||||
|
@ -256,7 +256,7 @@ Pseudo-code [#pseudo]_::
|
|||
process_time.use_times = (hasattr(os, 'times') and os.name != 'os2')
|
||||
|
||||
|
||||
Existing functions
|
||||
Existing Functions
|
||||
------------------
|
||||
|
||||
time.time()
|
||||
|
@ -340,8 +340,8 @@ Pseudo-code [#pseudo]_::
|
|||
seconds = int(seconds)
|
||||
_time.sleep(seconds)
|
||||
|
||||
Deprecated functions
|
||||
--------------------
|
||||
Deprecated Function
|
||||
-------------------
|
||||
|
||||
time.clock()
|
||||
^^^^^^^^^^^^
|
||||
|
@ -826,7 +826,7 @@ Get more detail in the `documentation of the NTP daemon
|
|||
Operating system time functions
|
||||
===============================
|
||||
|
||||
Monotonic clocks
|
||||
Monotonic Clocks
|
||||
----------------
|
||||
|
||||
========================= ========== =============== ============= ===============
|
||||
|
@ -1080,8 +1080,8 @@ Read the `gethrtime() manual page of Solaris 11
|
|||
On Solaris, gethrtime() is the same as clock_gettime(CLOCK_MONOTONIC).
|
||||
|
||||
|
||||
System time clocks
|
||||
------------------
|
||||
System clocks
|
||||
-------------
|
||||
|
||||
========================= =============== ============= ===============
|
||||
Name Resolution Include sleep Include suspend
|
||||
|
@ -1139,24 +1139,21 @@ clock is changed: `timerfd: add TFD_NOTIFY_CLOCK_SET to watch for clock changes
|
|||
API is not accepted yet, CLOCK_BOOTTIME provides a similar feature.
|
||||
|
||||
|
||||
Process time
|
||||
Process Time
|
||||
------------
|
||||
|
||||
The process time cannot be set. It is not monotonic: the clocks stop
|
||||
while the process is idle.
|
||||
|
||||
========================= ========== ============= ===============
|
||||
Name Resolution Include sleep Include suspend
|
||||
========================= ========== ============= ===============
|
||||
GetProcessTimes() 100 ns No No
|
||||
CLOCK_PROCESS_CPUTIME_ID 1 ns No No
|
||||
getrusage(RUSAGE_SELF) 1 µs No No
|
||||
times() \- No No
|
||||
clock() \- No (*) No
|
||||
========================= ========== ============= ===============
|
||||
|
||||
(*) On Windows, clock() does include time elapsed during a sleep. It does not
|
||||
on other operating systems.
|
||||
========================= ========== ============================ ===============
|
||||
Name Resolution Include sleep Include suspend
|
||||
========================= ========== ============================ ===============
|
||||
GetProcessTimes() 100 ns No No
|
||||
CLOCK_PROCESS_CPUTIME_ID 1 ns No No
|
||||
getrusage(RUSAGE_SELF) 1 µs No No
|
||||
times() \- No No
|
||||
clock() \- Yes on Windows, No otherwise No
|
||||
========================= ========== ============================ ===============
|
||||
|
||||
Examples of clock precision on x86_64:
|
||||
|
||||
|
@ -1206,7 +1203,7 @@ See also the `QueryProcessCycleTime() function
|
|||
(sum of the cycle time of all threads).
|
||||
|
||||
|
||||
Thread time
|
||||
Thread Time
|
||||
-----------
|
||||
|
||||
The thread time cannot be set. It is not monotonic: the clocks stop
|
||||
|
|
Loading…
Reference in New Issue