Open
Description
Short calls to time.sleep(t) end up sleeping for 1.0+t seconds. Found this by sleeping for short periods between bit-banging through the phases of a four-phase stepper. It would simply stop multiple times per minute for exactly one second, then continue.
This happens on multiple Sense boards but I have not been able to reproduce it on the M4 running it for (only) 10 minutes.
import time
while True:
t0 = time.monotonic()
time.sleep(0.002)
t = time.monotonic() - t0
if t > 0.1: print("[redacted]! ", t0, t)
In addition to the as-shown example, this test continues to fail with args up to (at least) 0.025.