def record(self, entry, ignoreTSC=False, dosave=True, loadtimer=False):
check_timer_list = self.timer_list[:]
timersanitycheck = TimerSanityCheck(check_timer_list,entry)
answer = None
if not timersanitycheck.check():
if not ignoreTSC:
print "[RecordTimer] timer conflict detected!"
print timersanitycheck.getSimulTimerList()
return timersanitycheck.getSimulTimerList()
else:
print "[RecordTimer] ignore timer conflict..."
if not dosave and loadtimer:
simulTimerList = timersanitycheck.getSimulTimerList()
if entry in simulTimerList:
entry.disabled = True
if entry in check_timer_list:
check_timer_list.remove(entry)
answer = simulTimerList
elif timersanitycheck.doubleCheck():
print "[RecordTimer] ignore double timer..."
return None
entry.timeChanged()
print "[Timer] Record " + str(entry)
entry.Timer = self
self.addTimerEntry(entry)
if dosave:
self.saveTimer()
return answer
评论列表
文章目录