diff options
| author | Damien George <damien@micropython.org> | 2021-07-22 00:04:01 +1000 |
|---|---|---|
| committer | Damien George <damien@micropython.org> | 2021-07-22 00:07:37 +1000 |
| commit | a5221c47eb60500506abf2c9967429879277714b (patch) | |
| tree | 79e1c3dc67d6e182b55f943fa04ac8fdcea9897c | |
| parent | db6d60b07967f6d75d74349b021b262cb8fee628 (diff) | |
docs/library/utime.rst: Clarify behaviour and precision of sleep ms/us.
This description is based on the existing bare-metal ports implementations.
Signed-off-by: Damien George <damien@micropython.org>
| -rw-r--r-- | docs/library/utime.rst | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/docs/library/utime.rst b/docs/library/utime.rst index b7c604dc7..ef2a572aa 100644 --- a/docs/library/utime.rst +++ b/docs/library/utime.rst @@ -74,10 +74,19 @@ Functions Delay for given number of milliseconds, should be positive or 0. + This function will delay for at least the given number of milliseconds, but + may take longer than that if other processing must take place, for example + interrupt handlers or other threads. Passing in 0 for *ms* will still allow + this other processing to occur. Use `sleep_us()` for more precise delays. + .. function:: sleep_us(us) Delay for given number of microseconds, should be positive or 0. + This function attempts to provide an accurate delay of at least *us* + microseconds, but it may take longer if the system has other higher priority + processing to perform. + .. function:: ticks_ms() Returns an increasing millisecond counter with an arbitrary reference point, that |
