summaryrefslogtreecommitdiff
path: root/Lib/asyncio/base_events.py
diff options
context:
space:
mode:
authorLarry Hastings <larry@hastings.org>2014-02-11 00:15:46 -0800
committerLarry Hastings <larry@hastings.org>2014-02-11 00:15:46 -0800
commit3f99504c08ebca685271c32289f8907bc456e1fc (patch)
treedeb0b2d3284cec1323ad0da34f96107ea3f64576 /Lib/asyncio/base_events.py
parent4cce8f2f40cc15235f44b3a47fec0444ed75e9fe (diff)
parent06847d9c8c30715c077e083de1c511e399af75f1 (diff)
downloadcpython-git-3f99504c08ebca685271c32289f8907bc456e1fc.tar.gz
Merge Python 3.4.0rc1 release branch.
Diffstat (limited to 'Lib/asyncio/base_events.py')
-rw-r--r--Lib/asyncio/base_events.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/Lib/asyncio/base_events.py b/Lib/asyncio/base_events.py
index 4207a7e9f1..377ea216f7 100644
--- a/Lib/asyncio/base_events.py
+++ b/Lib/asyncio/base_events.py
@@ -96,6 +96,7 @@ class BaseEventLoop(events.AbstractEventLoop):
self._default_executor = None
self._internal_fds = 0
self._running = False
+ self._clock_resolution = time.get_clock_info('monotonic').resolution
def _make_socket_transport(self, sock, protocol, waiter=None, *,
extra=None, server=None):
@@ -643,10 +644,10 @@ class BaseEventLoop(events.AbstractEventLoop):
self._process_events(event_list)
# Handle 'later' callbacks that are ready.
- now = self.time()
+ end_time = self.time() + self._clock_resolution
while self._scheduled:
handle = self._scheduled[0]
- if handle._when > now:
+ if handle._when >= end_time:
break
handle = heapq.heappop(self._scheduled)
self._ready.append(handle)