Every line of 'python timer event' code snippets is scanned for vulnerabilities by our powerful machine learning engine that combs millions of open source libraries, ensuring your Python code is secure.
60 def timerEvent(self, event): 61 if isinstance(event, VTimerEvent.VTimerEvent): 62 self.timeout.emit()
72 def timer(self): 73 while self.loop(): 74 if self.cron.check_trigger(time.localtime(time.time())[:5]): 75 self.logging.info("Cron executed.") 76 for chunk in [self.kwargs_raw["payload"], None]: 77 for payload in self.decode(chunk): 78 event = self.generateEvent( 79 payload, 80 self.kwargs.destination 81 ) 82 self.submit( 83 event, 84 "outbox" 85 ) 86 87 sleep(60)
664 def timer_callback(obj, event): 665 global cnt, sphere_actor, showm, tb 666 667 cnt += 1 668 tb.message = "Let's count to 10 and exit :" + str(cnt) 669 showm.render() 670 if cnt > 9: 671 showm.exit()
257 def timer_cb(self, timer): 258 """Timer callback. Update all our clocks.""" 259 dt_now = datetime.utcnow().replace(tzinfo=tz.UTC) 260 self.logger.debug("timer fired. utc time is '%s'" % (str(dt_now))) 261 262 for clock in self.clocks.values(): 263 clock.update_clock(dt_now) 264 265 # update clocks approx every second 266 timer.start(1.0)