def wait(timeout):
    global event
    event.wait(timeout if timeout else None)
    # FIXME?  If another event occurs right now, we will clear it and miss it!
    if event.is_set(): # if wait timed out, this will be false
        event.clear() # got this event, prepare for next
wait for event with timeout.  If event occurs, clear event
dataset/ETHPy150Open jon-jacky/PyModel/samples/Socket/stepper_a.py/wait