Tried something like that:
t1 = time.time()
ret = GPIO.wait_for_edge(input_pin, GPIO.BOTH, timeout=500)
t2 = time.time()
print(ret, t2 - t1)
The intention is to wait for a half second, but it takes only about 1ms and prints None 0.0010421276092529297
I think the calculation of timeout sec/nsec in line_event_wait() is wrong, and the nsec should be multiplied by 1000000 and not 1000.