PowerTimer.py 文件源码

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

项目:enigma2 作者: BlackHole 项目源码 文件源码
def do_backoff(self):
        if self.backoff == 0:
            self.backoff = 5*60
        else:
            self.backoff *= 2
            if self.backoff > 1800:
                self.backoff = 1800
        self.log(10, "backoff: retry in %d minutes" % (int(self.backoff)/60))
        #
        # If this is the first backoff of a repeat timer remember the original
        # begin/end times, so that we can use *these* when setting up the
        # repeat.
        # A repeat timer (self.repeat != 0) is one set for a given time on a
        # day.
        # A timer that repeats every <n> mins has autosleeprepeat="repeated" and
        # is a different beast, whcih doesn't need, and mustn't have, this.
        #
        if self.repeated and not hasattr(self, "real_begin"):
            self.real_begin = self.begin
            self.real_end = self.end
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号