From de48a7e4dac62ce88aff8fe97ad46ed3ddd9459a Mon Sep 17 00:00:00 2001 From: Rob Austein Date: Thu, 30 Apr 2009 00:35:58 +0000 Subject: timer.is_set() svn path=/rpkid/rpki/async.py; revision=2377 --- rpkid/rpki/async.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'rpkid/rpki/async.py') diff --git a/rpkid/rpki/async.py b/rpkid/rpki/async.py index 9bf91304..68d90aa8 100644 --- a/rpkid/rpki/async.py +++ b/rpkid/rpki/async.py @@ -94,6 +94,10 @@ class timer(object): except ValueError: pass + def is_set(self): + """Test whether this timer is currently set.""" + return self in self.queue + def expired(self): """Handle a timer that has expired. Subclass must define this.""" raise NotImplementedError -- cgit v1.2.3