Tin

Examples · learn/12-units · 185 of 339

sleep

examples/learn/12-units/sleep.tintin run examples/learn/12-units/sleep.tin
fn main() {
  let start = now()             // time since the program started, a Duration
  sleep(20ms)
  let took = now() - start
  print(took >= 20ms)
}