title: Wait for condition in given timeout
body: <p>I was wondering if there was a sufficient way or a module to wait for a condition(function that returns bool),  in given timeout?  Example</p>
  
  <pre><code>def wait_for_condition(condition,  timeout, interval) :
      # implementation 
      # return True if the condition met in given timeout, else return False
  </code></pre>
  
  <p>Thanks in advance!  </p>