tests/extmod/time_ms_us: Add test for calling ticks_cpu().
This is just to test that the function exists and returns some kind of valid value. Although this file is for testing ms/us functions, put the ticks_cpu() test here so not to add a new test file.
This commit is contained in:
parent
512f4a6ad1
commit
e3d11b6a6e
|
@ -9,3 +9,6 @@ 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)
|
||||
|
||||
# ticks_cpu may not be implemented, at least make sure it doesn't decrease
|
||||
print(utime.ticks_diff(utime.ticks_cpu(), utime.ticks_cpu()) >= 0)
|
||||
|
|
|
@ -1,2 +1,3 @@
|
|||
True
|
||||
True
|
||||
True
|
||||
|
|
Loading…
Reference in New Issue