Wait for condition in given timeout

Viewed 8544

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

def wait_for_condition(condition,  timeout, interval) :
    # implementation 
    # return True if the condition met in given timeout, else return False

Thanks in advance!

1 Answers
Related