python类TimerEntry()的实例源码

PowerTimer.py 文件源码 项目:enigma2 作者: BlackHole 项目源码 文件源码 阅读 30 收藏 0 点赞 0 评论 0
def __init__(self, begin, end, disabled = False, afterEvent = AFTEREVENT.NONE, timerType = TIMERTYPE.WAKEUP, checkOldTimers = False):
        timer.TimerEntry.__init__(self, int(begin), int(end))
        if checkOldTimers:
            if self.begin < time() - 1209600:
                self.begin = int(time())

        if self.end < self.begin:
            self.end = self.begin

        self.dontSave = False
        self.disabled = disabled
        self.timer = None
        self.__record_service = None
        self.start_prepare = 0
        self.timerType = timerType
        self.afterEvent = afterEvent
        self.autoincrease = False
        self.autoincreasetime = 3600 * 24 # 1 day
        self.autosleepinstandbyonly = 'no'
        self.autosleepdelay = 60
        self.autosleeprepeat = 'once'

        self.log_entries = []
        self.resetState()
PowerTimer.py 文件源码 项目:enigma2 作者: OpenLD 项目源码 文件源码 阅读 25 收藏 0 点赞 0 评论 0
def __init__(self, begin, end, disabled = False, afterEvent = AFTEREVENT.NONE, timerType = TIMERTYPE.WAKEUP, checkOldTimers = False, autosleepdelay = 60):
        timer.TimerEntry.__init__(self, int(begin), int(end))
        if checkOldTimers:
            if self.begin < time() - 1209600:
                self.begin = int(time())

        if self.end < self.begin:
            self.end = self.begin

        self.dontSave = False
        self.disabled = disabled
        self.timer = None
        self.__record_service = None
        self.start_prepare = 0
        self.timerType = timerType
        self.afterEvent = afterEvent
        self.autoincrease = False
        self.autoincreasetime = 3600 * 24 # 1 day
        self.autosleepinstandbyonly = 'no'
        self.autosleepdelay = autosleepdelay
        self.autosleeprepeat = 'once'
        self.autosleepwindow = 'no'
        self.autosleepbegin = self.begin
        self.autosleepend = self.end

        self.nettraffic = 'no'
        self.trafficlimit = 100
        self.netip = 'no'
        self.ipadress = "0.0.0.0"

        self.log_entries = []
        self.resetState()

        self.messageBoxAnswerPending = False

        #check autopowertimer
        if (self.timerType == TIMERTYPE.AUTOSTANDBY or self.timerType == TIMERTYPE.AUTODEEPSTANDBY) and not self.disabled and time() > 3600 and self.begin > time():
            self.begin = int(time())                        #the begin is in the future -> set to current time = no start delay of this timer
EPGRefreshTimer.py 文件源码 项目:enigma2-plugins 作者: opendreambox 项目源码 文件源码 阅读 31 收藏 0 点赞 0 评论 0
def __init__(self, begin, tocall, nocheck = False):
        timer.TimerEntry.__init__(self, int(begin), int(begin))

        self.function = tocall
        self.nocheck = nocheck
        if nocheck:
            self.state = self.StatePrepared


问题


面经


文章

微信
公众号

扫码关注公众号