Use floating-point rather than integer division to handle timeouts so that non-zero but sub-second waits don't collapse to zero