diff options
author | Damien George <damien.p.george@gmail.com> | 2018-03-04 00:17:33 +1100 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2018-03-04 00:17:33 +1100 |
commit | e3d11b6a6e101b55aae5907539a3a8d9fd432721 (patch) | |
tree | b3d095ef2104ae967f40c9869e8a6e0155d30420 /tests/extmod/time_ms_us.py | |
parent | 512f4a6ad1c495760b50eca1bdee60314814b077 (diff) | |
download | micropython-e3d11b6a6e101b55aae5907539a3a8d9fd432721.tar.gz micropython-e3d11b6a6e101b55aae5907539a3a8d9fd432721.zip |
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.
Diffstat (limited to 'tests/extmod/time_ms_us.py')
-rw-r--r-- | tests/extmod/time_ms_us.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/extmod/time_ms_us.py b/tests/extmod/time_ms_us.py index 31f07d31ba..4d0287da31 100644 --- a/tests/extmod/time_ms_us.py +++ b/tests/extmod/time_ms_us.py @@ -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) |