def TimeSynctimer(self):
now = time()
self.syncCount += 1
if now <= 31536000:
if self.syncCount <= 24 and now <= 31536000: # max 2 mins or when time is in sync
self.timesynctimer.start(5000, True)
else:
print "~"*100
print "[NAVIGATION] time sync failure, current time is %s, sync time is %s sec." % (ctime(now),(self.syncCount * 5))
if self.timertime > 0:
print "[NAVIGATION] next '%s' starts at %s" % ({0:"record-timer",1:"zap-timer",2:"power-timer",3:"plugin-timer"}[self.wakeuptyp], ctime(self.timertime))
else:
print "[NAVIGATION] no next timers"
print "="*100
#workaround for normal operation if no time sync after e2 start - box is in standby
self.gotopower()
else:
print "~"*100
print "[NAVIGATION] time sync successful, current time is %s, sync time is %s sec." % (ctime(now),(self.syncCount * 5))
self.wakeupCheck()
评论列表
文章目录