title: Python time.sleep indefinitely
body: <p>In Python's time module, there is a <code>sleep()</code> function, where you can make Python wait x seconds before resuming the program. Is there a way to do this indefinitely until a condition is met? For example:</p>
  
  <pre><code>while True:
      time.sleep()
      if x:
          break
  
  time.unsleep()
  </code></pre>
  
  <p>I am trying to make a pause function for my PyGame program. Any help is appreciated. </p>