Python timer 模块,TimerEntry() 实例源码

我们从Python开源项目中,提取了以下3个代码示例,用于说明如何使用timer.TimerEntry()

项目:enigma2    作者:BlackHole    | 项目源码 | 文件源码
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()
项目:enigma2    作者:OpenLD    | 项目源码 | 文件源码
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
项目:enigma2-plugins    作者:opendreambox    | 项目源码 | 文件源码
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