diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2012-03-15 01:22:16 +0100 |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2012-03-15 01:22:16 +0100 |
commit | 3d7c878fe370e59b142bac9bc32c67b4ac9d949e (patch) | |
tree | e987b46bdd66b5b8dd7d1b59da4c46d782131676 /Lib | |
parent | 071eca3f5c55f127f754bd5575123ec94d8c3eaa (diff) | |
download | cpython-git-3d7c878fe370e59b142bac9bc32c67b4ac9d949e.tar.gz |
Issue #14222: Use the new time.steady() function instead of time.time() for
timeout in queue and threading modules to not be affected of system time
update.
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/queue.py | 2 | ||||
-rw-r--r-- | Lib/threading.py | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/Lib/queue.py b/Lib/queue.py index ba608c5a4c..1dc72c4bbe 100644 --- a/Lib/queue.py +++ b/Lib/queue.py @@ -6,7 +6,7 @@ except ImportError: import dummy_threading as threading from collections import deque from heapq import heappush, heappop -from time import time +from time import steady as time __all__ = ['Empty', 'Full', 'Queue', 'PriorityQueue', 'LifoQueue'] diff --git a/Lib/threading.py b/Lib/threading.py index 441c7bd903..197dec4fb1 100644 --- a/Lib/threading.py +++ b/Lib/threading.py @@ -3,7 +3,7 @@ import sys as _sys import _thread -from time import time as _time, sleep as _sleep +from time import steady as _time, sleep as _sleep from traceback import format_exc as _format_exc from _weakrefset import WeakSet |