def _tick(self): try: self.onTimer() finally: if getattr(self, 'enabled', False) and getattr( self, 'interval', None): call_later.call_later(self._tick, self.interval)
def _tick(self): try: self.onTimer() finally: if getattr(self, 'enabled', False) and getattr(self, 'interval', None): call_later.call_later(self._tick, self.interval)
def startTimer(self): if getattr(self, 'interval', None): call_later.call_later(self._tick, self.interval) else: call_later.cancel_call(self._tick)