예제 #1
0
파일: clock.py 프로젝트: kdg14445/piradio
 def tick(self):
     super(ClockService, self).tick()
     timeofday = commons.timeofday()
     if timeofday != self.prev_timeofday:
         logging.debug('ClockService: time changed to %s', timeofday)
         self.prev_timeofday = timeofday
         self.notify_subscribers(self.TIME_CHANGED_EVENT, timeofday)
예제 #2
0
파일: clock.py 프로젝트: kdg14445/piradio
 def __init__(self):
     super(ClockService, self).__init__(tick_interval=1.0)
     self.prev_timeofday = commons.timeofday()