[Python-checkins] peps: PEP 418: Cleanup the Process Time table
victor.stinner
python-checkins at python.org
Sat Apr 14 02:46:18 CEST 2012
http://hg.python.org/peps/rev/45fdf1653f8c
changeset: 4249:45fdf1653f8c
user: Victor Stinner <victor.stinner at gmail.com>
date: Sat Apr 14 02:45:49 2012 +0200
summary:
PEP 418: Cleanup the Process Time table
files:
pep-0418.txt | 37 ++++++++++++++++++-------------------
1 files changed, 18 insertions(+), 19 deletions(-)
diff --git a/pep-0418.txt b/pep-0418.txt
--- a/pep-0418.txt
+++ b/pep-0418.txt
@@ -77,7 +77,7 @@
Python functions
================
-New functions
+New Functions
-------------
time.get_clock_info(name)
@@ -256,7 +256,7 @@
process_time.use_times = (hasattr(os, 'times') and os.name != 'os2')
-Existing functions
+Existing Functions
------------------
time.time()
@@ -340,8 +340,8 @@
seconds = int(seconds)
_time.sleep(seconds)
-Deprecated functions
---------------------
+Deprecated Function
+-------------------
time.clock()
^^^^^^^^^^^^
@@ -826,7 +826,7 @@
Operating system time functions
===============================
-Monotonic clocks
+Monotonic Clocks
----------------
========================= ========== =============== ============= ===============
@@ -1080,8 +1080,8 @@
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 @@
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 @@
(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
--
Repository URL: http://hg.python.org/peps
More information about the Python-checkins
mailing list