diff Lib/queue.py @ 76597:76d2e0761d18

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
author Victor Stinner <victor.stinner@gmail.com>
date Sun, 29 Apr 2012 02:41:27 +0200
parents d97ae725814c
children 2122d56d6bc5 8d28d44f3a9a
line wrap: on
line diff
--- a/Lib/queue.py	Sat Apr 28 23:47:33 2012 +0200
+++ b/Lib/queue.py	Sun Apr 29 02:41:27 2012 +0200
@@ -6,7 +6,10 @@
     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']