(module main)

(import std.time (monotonic_ms sleep_ms_zero))

(fn imported_time_monotonic_non_negative () -> bool
  (>= (monotonic_ms) 0))

(fn imported_time_sleep_zero_score () -> i32
  (+ (sleep_ms_zero) 42))

(fn imported_time_facade_ok () -> bool
  (if (imported_time_monotonic_non_negative)
    (= (imported_time_sleep_zero_score) 42)
    false))

(fn main () -> i32
  (if (imported_time_facade_ok)
    42
    1))

(test "explicit std time monotonic facade"
  (imported_time_monotonic_non_negative))

(test "explicit std time sleep zero facade"
  (= (imported_time_sleep_zero_score) 42))

(test "explicit std time facade all"
  (= (main) 42))
