- # we either go trough Prepare/Start/End-state if the timer is still running,
- # or skip it when it's alrady past the end.
-
- if entry.end > time.time():
+ # when the timer has not yet started, and is already passed,
+ # don't go trough waiting/running/end-states, but sort it
+ # right into the processedTimers.
+ if entry.shouldSkip() or entry.state == TimerEntry.StateEnded or (entry.state == TimerEntry.StateWaiting and entry.disabled):
+ print "already passed, skipping"
+ bisect.insort(self.processed_timers, entry)
+ entry.state = TimerEntry.StateEnded
+ else: