class Poll(object):
def __init__(self):
self.__poll_timer = eTimer()
- self.__poll_timer.timeout.get().append(self.poll)
+ self.__poll_timer.callback.append(self.poll)
self.__interval = 1000
self.__enabled = False
def poll(self):
self.changed((self.CHANGED_POLL,))
+
+ def doSuspend(self, suspended):
+ self.enabled = not suspended
+ if not suspended:
+ self.poll()
+
+ def destroy(self):
+ self.__poll_timer.callback.remove(self.poll)