sleep_ms poor accuracy #17184
Unanswered
kevinjwalters
asked this question in
nRF
Replies: 1 comment
-
Does this happen also on a recent MicroPython version, like 1.25.0 ? Does this cause practical problems that you are looking to fix? Or is this more of a FYI for other people? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I've noticed
sleep_ms()
has poor accuracy in MicroPython 2.1.2 on a micro:bit V2. A bit of REPLing showssleep_ms
vssleep_us
below. It's ranging from 11364us to 12916us in that quick bit of testing whereas sleep_us is very consistent at 12076 to 12084.The port specific documentation describes
sleep_ms
asThe general docs have more detail:
Depending on how one interprets "at least" wrt granularity at 11.364ms for a 12ms delay
sleep_ms
is not honouring that.Beta Was this translation helpful? Give feedback.
All reactions