summaryrefslogtreecommitdiffstats
path: root/Lib/threading.py
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2012-04-29 00:41:27 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2012-04-29 00:41:27 (GMT)
commitec89539ccccd6103665a7a5c7234cf09f27c1c72 (patch)
tree5899bfa59a08ae9db3e630c2419ee87b4df6b101 /Lib/threading.py
parentca6e40f12a3145856abfe69d5cd8b97df6ebca95 (diff)
downloadcpython-ec89539ccccd6103665a7a5c7234cf09f27c1c72.zip
cpython-ec89539ccccd6103665a7a5c7234cf09f27c1c72.tar.gz
cpython-ec89539ccccd6103665a7a5c7234cf09f27c1c72.tar.bz2
Issue #14428, #14397: Implement the PEP 418
* Rename time.steady() to time.monotonic() * On Windows, time.monotonic() uses GetTickCount/GetTickCount64() instead of QueryPerformanceCounter() * time.monotonic() uses CLOCK_HIGHRES if available * Add time.get_clock_info(), time.perf_counter() and time.process_time() functions
Diffstat (limited to 'Lib/threading.py')
-rw-r--r--Lib/threading.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/Lib/threading.py b/Lib/threading.py
index 8c2cee9..6c34d49 100644
--- a/Lib/threading.py
+++ b/Lib/threading.py
@@ -3,7 +3,11 @@
import sys as _sys
import _thread
-from time import steady as _time, sleep as _sleep
+from time import sleep as _sleep
+try:
+ from time import monotonic as _time
+except ImportError:
+ from time import time as _time
from traceback import format_exc as _format_exc
from _weakrefset import WeakSet