- # 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.end <= time.time() and entry.state == TimerEntry.StateWait:
+ bisect.insort(self.processed_timers, entry)
+ entry.state = TimerEntry.StateEnded
+ else: