I am trying to allow a certain number of seconds for the condition to be met.
timeout = time.time() + 15
while SOMETHING NOT MET:
time.sleep(1)
if time.time() > timeout:
raise Exception
continue
Is this the correct way to allow up to 15s? This doesn't seem to work as expected. Perhaps there is a better/cleaner way.