diff --git a/pep-0418.txt b/pep-0418.txt index 0f86ded15..246a38863 100644 --- a/pep-0418.txt +++ b/pep-0418.txt @@ -172,14 +172,14 @@ It is available on all platforms and cannot fail. Pseudo-code:: def highres(): - if monotonic.use_performance_counter: + if highres.use_performance_counter: try: return _time.QueryPerformanceCounter() except OSError: # QueryPerformanceFrequency() may fail, if the installed # hardware does not support a high-resolution performance # counter for example - monotonic.use_performance_counter = False + highres.use_performance_counter = False if highres.use_monotonic: # Monotonic clock is preferred over system clock try: @@ -194,13 +194,8 @@ Pseudo-code:: Clocks ====== -Monotonic ---------- - -Summary -^^^^^^^ - -Table summarizing all monotonic clocks: +Monotonic clocks +---------------- ========================= =============== =============== ================ ==================== Name Resolution Accuracy Adjusted by NTP? Action on suspend @@ -215,11 +210,8 @@ GetTickCount[64]() 1 ms 1 ms - 15 ms No Inclu timeGetTime() 1 ms 1 ms - 15 ms No ? ========================= =============== =============== ================ ==================== -(*) The accurary of monotonic clocks depends on the operating system. - - * Linux: ? - * FreeBSD: ? - * Solaris: ? +(*) The accurary of monotonic clocks depends on the operating system and the +hardware clock. The resolution is the smallest difference between two timestamps supported by the format used by the clock. For example, clock_gettime() uses a timespec @@ -420,16 +412,8 @@ Read the `gethrtime() manual page of Solaris 11 On Solaris, gethrtime() is the same as clock_gettime(CLOCK_MONOTONIC). -System time ------------ - -The system time can be set manually by the system administrator or -automatically by a NTP daemon. - -Summary -^^^^^^^ - -Table summarizing all system time clocks: +System time clocks +------------------ ========================= =============== =============== Name Resolution Accuracy @@ -441,12 +425,8 @@ ftime() 1 ms (*) time() 1 sec 1 sec ========================= =============== =============== -(*) The accurary of system clocks depends on the operating system. - - * Windows: 1 ms - 15 ms - * Linux: ? - * Mac OS X: ? - * FreeBSD: ? +(*) The accurary of system clocks depends on the operating system and the +hardware clock. On Windows, the accuracy is in the range 1 ms - 15 ms. Windows: GetSystemTimeAsFileTime