(module main)

(fn monotonic_self_equal () -> bool
  (let now i32 (std.time.monotonic_ms))
  (= now now))

(fn sleep_zero_then_self_equal () -> bool
  (std.time.sleep_ms 0)
  (monotonic_self_equal))

(test "monotonic value is self equal"
  (monotonic_self_equal))

(test "sleep zero returns"
  (sleep_zero_then_self_equal))

(fn main () -> i32
  (std.time.sleep_ms 0)
  (if (monotonic_self_equal)
    0
    1))
