mirror of
https://github.com/micropython/micropython.git
synced 2026-01-04 19:20:22 +01:00
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:
@@ -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
|
||||
--------------
|
||||
|
||||
Reference in New Issue
Block a user