[Python-checkins] peps: PEP 418: Replace accuracy with precision
victor.stinner
python-checkins at python.org
Thu Apr 12 00:39:56 CEST 2012
http://hg.python.org/peps/rev/a86b09fffca8
changeset: 4224:a86b09fffca8
user: Victor Stinner <victor.stinner at gmail.com>
date: Thu Apr 12 00:39:22 2012 +0200
summary:
PEP 418: Replace accuracy with precision
files:
pep-0418.txt | 54 ++++++++++++++++++++--------------------
1 files changed, 27 insertions(+), 27 deletions(-)
diff --git a/pep-0418.txt b/pep-0418.txt
--- a/pep-0418.txt
+++ b/pep-0418.txt
@@ -127,7 +127,7 @@
On Windows, QueryPerformanceCounter() is not used even though it has a better
-accuracy than GetTickCount(). It is not reliable and has too many issues.
+precision than GetTickCount(). It is not reliable and has too many issues.
.. note::
@@ -242,7 +242,7 @@
* Optional keys:
- * "accuracy" (float): accuracy in seconds of the clock
+ * "precision" (float): precision in seconds of the clock
* "is_adjusted" (bool): True if the clock can be adjusted (e.g. by a NTP
daemon)
@@ -258,12 +258,12 @@
structure which has two integer fields, tv_sec and tv_nsec, so the resolution
is 1 nanosecond.
-Accuracy
+Precision
--------
-The accuracy is the effective smallest difference between two timestamps of the
+The precision is the effective smallest difference between two timestamps of the
clock. It does not reflect the stability the clock rate. For example,
-QueryPerformanceCounter() has a good accuracy but is known to not have a steady
+QueryPerformanceCounter() has a good precision but is known to not have a steady
rate.
@@ -407,10 +407,10 @@
timeGetTime() 1 ms No Yes ?
========================= ========== =============== ============= ===============
-Examples of clock accuracy on x86_64:
+Examples of clock precision on x86_64:
========================= ================ ===============
-Name Operating system Accuracy
+Name Operating system Precision
========================= ================ ===============
CLOCK_MONOTONIC_RAW Linux 3.2 1 ns
CLOCK_MONOTONIC Linux 3.2 1 ns
@@ -422,7 +422,7 @@
GetTickCount Windows Seven 15.6 ms
========================= ================ ===============
-For CLOCK_MONOTONIC and CLOCK_MONOTONIC_RAW, the accuracy of this table is the
+For CLOCK_MONOTONIC and CLOCK_MONOTONIC_RAW, the precision of this table is the
result of clock_getres(). It looks like Linux does not implement
clock_getres() and always return 1 nanosecond.
@@ -507,7 +507,7 @@
High-resolution performance counter. It is monotonic.
QueryPerformanceFrequency() gives its frequency.
-It has a much higher resolution, but has lower long term accuracy than
+It has a much higher resolution, but has lower long term precision than
GetTickCount() and timeGetTime() clocks. For example, it will drift
compared to the low precision clocks.
@@ -577,8 +577,8 @@
GetTickCount64() was added to Windows Vista and Windows Server 2008.
-The clock resolution is 1 millisecond. Its accuracy is usually around
-15 ms. It is possible to improve the accuracy using the `undocumented
+The clock resolution is 1 millisecond. Its precision is usually around
+15 ms. It is possible to improve the precision using the `undocumented
NtSetTimerResolution() function
<http://undocumented.ntinternals.net/UserMode/Undocumented%20Functions/Time/NtSetTimerResolution.html>`_.
There are applications using this undocumented function, example:
@@ -587,7 +587,7 @@
WaitForSingleObject() use the same timer than GetTickCount() with the same
resolution.
-GetTickCount() has an accuracy of 55 ms on Windows 9x.
+GetTickCount() has an precision of 55 ms on Windows 9x.
Windows: timeGetTime
@@ -662,10 +662,10 @@
time() 1 sec
========================= ===============
-Examples of clock accuracy on x86_64:
+Examples of clock precision on x86_64:
========================= ================ ===============
-Name Operating system Accuracy
+Name Operating system Precision
========================= ================ ===============
CLOCK_REALTIME Linux 3.2 1 ns
CLOCK_REALTIME FreeBSD 8.2 11 ns
@@ -674,7 +674,7 @@
GetSystemTimeAsFileTime Windows Seven 15.6 ms
========================= ================ ===============
-For CLOCK_REALTIME, the accuracy of this table is the result of clock_getres().
+For CLOCK_REALTIME, the precision of this table is the result of clock_getres().
It looks like Linux does not implement clock_getres() and always return 1
nanosecond.
@@ -691,7 +691,7 @@
and time().
The system time resolution can be read using
-GetSystemTimeAdjustment(). The accuracy is usually between 1
+GetSystemTimeAdjustment(). The precision is usually between 1
millisecond and 15 milliseconds. Resolution:
* GetSystemTimeAsFileTime(): 100 nanoseconds
@@ -723,7 +723,7 @@
Process time
------------
-The process time cannot be set. It It is not monotonic: the clocks stop while the
+The process time cannot be set. It is not monotonic: the clocks stop while the
process is idle.
========================= ===============
@@ -734,10 +734,10 @@
clock() \-
========================= ===============
-Examples of clock accuracy on x86_64:
+Examples of clock precision on x86_64:
========================= ================ ===============
-Name Operating system Accuracy
+Name Operating system Precision
========================= ================ ===============
CLOCK_PROCESS_CPUTIME_ID Linux 3.2 1 ns
clock() Linux 3.2 1 µs
@@ -747,10 +747,10 @@
GetProcessTimes() Windows Seven 15.6 ms
========================= ================ ===============
-The accuracy of clock() in this table is the result of 1 / CLOCKS_PER_SEC.
-For CLOCK_PROCESS_CPUTIME_ID, the accuracy of this table is the result of
+The precision of clock() in this table is the result of 1 / CLOCKS_PER_SEC.
+For CLOCK_PROCESS_CPUTIME_ID, the precision of this table is the result of
clock_getres(). It looks like Linux does not implement clock_getres() and
-always return 1 nanosecond. For GetProcessTimes(), the accuracy is read using
+always return 1 nanosecond. For GetProcessTimes(), the precision is read using
GetSystemTimeAdjustment().
@@ -792,19 +792,19 @@
CLOCK_THREAD_CPUTIME_ID 1 ns
========================= ===============
-Examples of clock accuracy on x86_64:
+Examples of clock precision on x86_64:
========================= ================ ===============
-Name Operating system Accuracy
+Name Operating system Precision
========================= ================ ===============
CLOCK_THREAD_CPUTIME_ID Linux 3.2 1 ns
CLOCK_THREAD_CPUTIME_ID FreeBSD 8.2 1 µs
GetThreadTimes() Windows Seven 15.6 ms
========================= ================ ===============
-For CLOCK_THREAD_CPUTIME_ID, the accuracy of this table is the result of
+For CLOCK_THREAD_CPUTIME_ID, the precision of this table is the result of
clock_getres(). It looks like Linux does not implement clock_getres() and
-always return 1 nanosecond. For GetThreadTimes(), the accuracy is read using
+always return 1 nanosecond. For GetThreadTimes(), the precision is read using
GetSystemTimeAdjustment().
Functions
@@ -1016,7 +1016,7 @@
select(nfds, readfds, writefds, exceptfs, timeout).
Since Linux 2.6.28, select() uses high-resolution timers to handle the timeout.
-A process has a "slack" attribute to configure the accuracy of the timeout, the
+A process has a "slack" attribute to configure the precision of the timeout, the
default slack is 50 microseconds. Before Linux 2.6.28, timeouts for select()
were handled by the main timing subsystem at a jiffy-level resolution. Read
also `High- (but not too high-) resolution timeouts
--
Repository URL: http://hg.python.org/peps
More information about the Python-checkins
mailing list