diff options
author | robert-hh <robert@hammelrath.com> | 2024-08-17 17:07:44 +0200 |
---|---|---|
committer | Damien George <damien@micropython.org> | 2024-09-06 17:43:49 +1000 |
commit | 1a6279ba37678893db9f2756fceaa5c817cae888 (patch) | |
tree | 3371cb97fdb96f9d1c543f0cc1cdf79e4e2c2479 /docs/samd/quickref.rst | |
parent | ed86fdbdf6e2d3eb9a118d3476ce4c370ec48b06 (diff) | |
download | micropython-1a6279ba37678893db9f2756fceaa5c817cae888.tar.gz micropython-1a6279ba37678893db9f2756fceaa5c817cae888.zip |
samd/mphalport: Simplify mp_hal_delay_ms().
Do NOT use `mp_hal_delay_us()` for short delays. This was initially done
to make short delays precise, but it does not allow for scheduling. Leave
using `mp_hal_delay_us()` to user code if needed.
Signed-off-by: robert-hh <robert@hammelrath.com>
Diffstat (limited to 'docs/samd/quickref.rst')
-rw-r--r-- | docs/samd/quickref.rst | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/docs/samd/quickref.rst b/docs/samd/quickref.rst index 60c57b3a47..25b5a8fc8a 100644 --- a/docs/samd/quickref.rst +++ b/docs/samd/quickref.rst @@ -65,6 +65,8 @@ Use the :mod:`time <time>` module:: start = time.ticks_ms() # get millisecond counter delta = time.ticks_diff(time.ticks_ms(), start) # compute time difference +Note that :func:`time.sleep_us()` delays by busy waiting. During that time, other tasks are +not scheduled. Clock and time -------------- |