title: How do I make a timer in python?
body: <p>I want a timer, but I want it to just affect one function, so it can't just be 
  <code>sleep()</code>.</p>
  
  <p>For example:</p>
  
  <pre><code>def printSomething():
      print("Something")
  def functionWithTheTimer():
      for i in range(0, 5):
          #wait for 1 second
          print("Timer ran out")
  </code></pre>
  
  <p>Say the first function is called when a button is clicked, and the second function should print something out every second, both should act independently.</p>
  
  <p>If I used <code>sleep()</code>, I couldn't execute the first function within that one second, and that's a problem for me. How do I fix this?</p>