summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEthan Jackson <ethan@nicira.com>2010-09-17 15:06:17 -0700
committerJustin Pettit <jpettit@nicira.com>2010-10-05 16:44:45 -0700
commitb7384540fc15270a94beebb4797fcf09a8494a58 (patch)
tree8f64faecabf5071f6aec98583b5d3579b84e9509
parent083d5565bb3dc5471affa1b490311c8980be7857 (diff)
downloadopenvswitch-b7384540fc15270a94beebb4797fcf09a8494a58.tar.gz
python: timer_wait_until calculated current time incorrectly
The timer_wait_until function in poller.py was using Time.msec to figure out the current time. Unfortunately, Time.msec does not in exist. Changed to use ovs.timeval.msec .
-rw-r--r--python/ovs/poller.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/python/ovs/poller.py b/python/ovs/poller.py
index 57417c481..2a0b2ecbb 100644
--- a/python/ovs/poller.py
+++ b/python/ovs/poller.py
@@ -15,6 +15,7 @@
import errno
import logging
import select
+import ovs.timeval
class Poller(object):
"""High-level wrapper around the "poll" system call.
@@ -62,15 +63,15 @@ class Poller(object):
self.__timer_wait(msec)
def timer_wait_until(self, msec):
- """Causes the following call to self.block() to wake up when the
- current time, as returned by Time.msec(), reaches 'msec' or later. If
+ """Causes the following call to self.block() to wake up when the current
+ time, as returned by ovs.timeval.msec(), reaches 'msec' or later. If
'msec' is earlier than the current time, the following call to
self.block() will not block at all.
The timer registration is one-shot: only the following call to
self.block() is affected. The timer will need to be re-registered
after self.block() is called if it is to persist."""
- now = Time.msec()
+ now = ovs.timeval.msec()
if msec <= now:
self.immediate_wake()
else: