Navigation.py 文件源码

python
阅读 37 收藏 0 点赞 0 评论 0

项目:enigma2 作者: OpenLD 项目源码 文件源码
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()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号