From ec89539ccccd6103665a7a5c7234cf09f27c1c72 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Sun, 29 Apr 2012 02:41:27 +0200 Subject: 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 --- Lib/queue.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'Lib/queue.py') diff --git a/Lib/queue.py b/Lib/queue.py index 1dc72c4bbe..c3296fe138 100644 --- a/Lib/queue.py +++ b/Lib/queue.py @@ -6,7 +6,10 @@ except ImportError: import dummy_threading as threading from collections import deque from heapq import heappush, heappop -from time import steady as time +try: + from time import monotonic as time +except ImportError: + from time import time __all__ = ['Empty', 'Full', 'Queue', 'PriorityQueue', 'LifoQueue'] -- cgit v1.2.1