Skip to content
Snippets Groups Projects
Commit acea9352 authored by Paul Sokolovsky's avatar Paul Sokolovsky
Browse files

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
Branches
No related tags found
No related merge requests found
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)
True
True
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment