mirror of
https://github.com/micropython/micropython.git
synced 2026-01-07 12:40:15 +01:00
tests: Replace umodule with module everywhere.
This work was funded through GitHub Sponsors. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
# test machine.Timer
|
||||
|
||||
try:
|
||||
import utime, umachine as machine
|
||||
import time, machine as machine
|
||||
|
||||
machine.Timer
|
||||
except:
|
||||
@@ -29,10 +29,10 @@ t.deinit()
|
||||
|
||||
# create one-shot timer with callback and wait for it to print (should be just once)
|
||||
t = machine.Timer(period=1, mode=machine.Timer.ONE_SHOT, callback=lambda t: print("one-shot"))
|
||||
utime.sleep_ms(5)
|
||||
time.sleep_ms(5)
|
||||
t.deinit()
|
||||
|
||||
# create periodic timer with callback and wait for it to print
|
||||
t = machine.Timer(period=4, mode=machine.Timer.PERIODIC, callback=lambda t: print("periodic"))
|
||||
utime.sleep_ms(14)
|
||||
time.sleep_ms(14)
|
||||
t.deinit()
|
||||
|
||||
Reference in New Issue
Block a user