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>
This commit is contained in:
robert-hh
2024-08-17 17:07:44 +02:00
committed by Damien George
parent ed86fdbdf6
commit 1a6279ba37
2 changed files with 5 additions and 7 deletions

View File

@@ -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
--------------