title: Python Escape Room Timer
body: <p>I'm new to programming and to help learn it I have been building an 'escape room' game using Python. I have the following that runs the bomb on a seperate thread.</p>
  
  <pre><code>import time
  import threading
  from threading import Thread
  
  def countdown(t):
      while t:
          mins, secs = divmod(t, 60)
          timeformat = '{:02d}:{:02d}'.format(mins, secs)
          time.sleep(1)
          t -= 1
      print  """
      The bomb goes off
      GAME OVER
      """
  </code></pre>
  
  <p>Then in the main programme</p>
  
  <pre><code>t=3600 #60 minute game
  game_thread=Thread(target=countdown,args=(t,))
  game_thread.start()
  </code></pre>
  
  <p>What I would like to do is make it possible for the player to check how much time is left on the timer and for the timer to stop when the player has defused the bomb. Does anyone have any advice on how I can do that?</p>
  
  <p>Thanks</p>