pdf-icon

Timer

Example

Program delay and print runtime

from m5stack import *
from m5ui import *
from uiflow import *
import time

setScreenColor(0x222222)

print(time.ticks_ms())
wait_ms(100)
print(time.ticks_ms())
wait(1)
print(time.ticks_ms())

API

wait_ms(100)
  • Program delay/ms
wait(1)
  • Program delay/s
print(time.ticks_ms())
  • Get current runtime/ms
On This Page