inf = infinity = float('inf')

class Timer:

    def __init__(self, duration, *callbacks):
        self.duration = duration
        self.callbacks = list(callbacks)

        self.elapsed = 0
        self.paused = False

    def register(self, callback):
        self.callbacks.append(callback)

    def unregister(self, callback):
        self.callbacks.remove(callback)

    def pause(self):
        self.paused = True

    def unpause(self):
        self.pause = False

    def update(self, time):
        if self.elapsed > self.duration:
            return

        self.elapsed += time

        if self.elapsed > self.duration:
            for callback in self.callbacks:
                callback()



@@ -184,16 +184,45 @@
 sed = 0%0A
+        self.expired = False%0A
         
@@ -233,32 +233,32 @@
 .paused = False%0A
-
 %0A    def registe
@@ -522,16 +522,61 @@
  time):%0A
+        if self.expired:%0A            return%0A%0A
         
@@ -691,32 +691,64 @@
  self.duration:%0A
+            self.expired = True%0A
             for 
@@ -803,9 +803,64 @@
 back()%0A%0A
+    def has_expired(self):%0A        return self.expired%0A
 %0A

Add a has_expired() method to the Timer class.