Commit acea9352 authored by Paul Sokolovsky's avatar Paul Sokolovsky

tests/extmod: Add tests for sleep_ms/us(), ticks_ms/us/diff().

Simple smoke tests, mostly for coverage. Added to extmod based on the fact
that they're extensions to standard modules.
parent 9058a703
import sys
import utime
try:
utime.sleep_ms
except AttributeError:
print("SKIP")
sys.exit()
utime.sleep_ms(1)
utime.sleep_us(1)
print(utime.ticks_diff(utime.ticks_ms(), utime.ticks_ms()) <= 1)
print(utime.ticks_diff(utime.ticks_us(), utime.ticks_us()) <= 500)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment