• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Python timer.isRunning函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Python中timer.isRunning函数的典型用法代码示例。如果您正苦于以下问题:Python isRunning函数的具体用法?Python isRunning怎么用?Python isRunning使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了isRunning函数的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。

示例1: isRecording

	def isRecording(self):
		isRunning = False
		for timer in self.timer_list:
			if timer.isRunning() and not timer.justplay:
				isRunning = True
				break
		return isRunning
开发者ID:ybagci,项目名称:enigma2,代码行数:7,代码来源:RecordTimer.py


示例2: isProcessing

	def isProcessing(self, exceptTimer = None, endedTimer = None):
		isRunning = False
		for timer in self.timer_list:
			if timer.timerType != TIMERTYPE.AUTOSTANDBY and timer.timerType != TIMERTYPE.AUTODEEPSTANDBY and timer.timerType != exceptTimer and timer.timerType != endedTimer:
				if timer.isRunning():
					isRunning = True
					break
		return isRunning
开发者ID:elshaca,项目名称:enigma2,代码行数:8,代码来源:PowerTimer.py


示例3: isInRepeatTimer

	def isInRepeatTimer(self, timer, event):
		time_match = 0
		is_editable = False
		begin = event.getBeginTime()
		duration = event.getDuration()
		end = begin + duration
		timer_end = timer.end
		if timer.disabled and timer.isRunning():
			if begin < timer.begin <= end or timer.begin <= begin <= timer_end:
				return True
			else:
				return False
		if timer.justplay and (timer_end - timer.begin) <= 1:
			timer_end += 60
		bt = localtime(begin)
		bday = bt.tm_wday
		begin2 = 1440 + bt.tm_hour * 60 + bt.tm_min
		end2 = begin2 + duration / 60
		xbt = localtime(timer.begin)
		xet = localtime(timer_end)
		offset_day = False
		checking_time = timer.begin < begin or begin <= timer.begin <= end
		if xbt.tm_yday != xet.tm_yday:
			oday = bday - 1
			if oday == -1: oday = 6
			offset_day = timer.repeated & (1 << oday)
		xbegin = 1440 + xbt.tm_hour * 60 + xbt.tm_min
		xend = xbegin + ((timer_end - timer.begin) / 60)
		if xend < xbegin:
			xend += 1440
		if timer.repeated & (1 << bday) and checking_time:
			if begin2 < xbegin <= end2:
				if xend < end2:
					# recording within event
					time_match = (xend - xbegin) * 60
					is_editable = True
				else:
					# recording last part of event
					time_match = (end2 - xbegin) * 60
					summary_end = (xend - end2) * 60
					is_editable = not summary_end and True or time_match >= summary_end
			elif xbegin <= begin2 <= xend:
				if xend < end2:
					# recording first part of event
					time_match = (xend - begin2) * 60
					summary_end = (begin2 - xbegin) * 60
					is_editable = not summary_end and True or time_match >= summary_end
				else:
					# recording whole event
					time_match = (end2 - begin2) * 60
					is_editable = True
			elif offset_day:
				xbegin -= 1440
				xend -= 1440
				if begin2 < xbegin <= end2:
					if xend < end2:
						# recording within event
						time_match = (xend - xbegin) * 60
						is_editable = True
					else:
						# recording last part of event
						time_match = (end2 - xbegin) * 60
						summary_end = (xend - end2) * 60
						is_editable = not summary_end and True or time_match >= summary_end
				elif xbegin <= begin2 <= xend:
					if xend < end2:
						# recording first part of event
						time_match = (xend - begin2) * 60
						summary_end = (begin2 - xbegin) * 60
						is_editable = not summary_end and True or time_match >= summary_end
					else:
						# recording whole event
						time_match = (end2 - begin2) * 60
						is_editable = True
		elif offset_day and checking_time:
			xbegin -= 1440
			xend -= 1440
			if begin2 < xbegin <= end2:
				if xend < end2:
					# recording within event
					time_match = (xend - xbegin) * 60
					is_editable = True
				else:
					# recording last part of event
					time_match = (end2 - xbegin) * 60
					summary_end = (xend - end2) * 60
					is_editable = not summary_end and True or time_match >= summary_end
			elif xbegin <= begin2 <= xend:
				if xend < end2:
					# recording first part of event
					time_match = (xend - begin2) * 60
					summary_end = (begin2 - xbegin) * 60
					is_editable = not summary_end and True or time_match >= summary_end
				else:
					# recording whole event
					time_match = (end2 - begin2) * 60
					is_editable = True
		return time_match and is_editable
开发者ID:idrogeno,项目名称:IdroMips,代码行数:98,代码来源:RecordTimer.py


示例4: isRecording

	def isRecording(self):
		for timer in self.timer_list:
			if timer.isRunning() and not timer.justplay:
				return True
		return False
开发者ID:idrogeno,项目名称:IdroMips,代码行数:5,代码来源:RecordTimer.py


示例5: isRecording

	def isRecording(self):
		isRunning = False
		for timer in self.timer_list:
			if timer.isRunning() and not (timer.justplay or timer.justremind):
				isRunning = True
		return isRunning
开发者ID:kingvuplus,项目名称:test,代码行数:6,代码来源:RecordTimer.py



注:本文中的timer.isRunning函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python timer.start函数代码示例发布时间:2022-05-27
下一篇:
Python timer.getNextActivation函数代码示例发布时间:2022-05-27
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap