sleep_ms poor accuracy #17184
Unanswered
kevinjwalters
asked this question in
nRF
Replies: 2 comments 1 reply
-
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
-
I was using the current version of MicroPython for micro:bit. I was seeking to raise awareness and to canvass opinions on whether behaviour was acceptable and whether the documentation should be amended. I now have a special build of
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
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