Time

System time

type Time = Int

type Duration = {#days : Nat; #hours : Nat; #minutes : Nat; #seconds : Nat; #milliseconds : Nat; #nanoseconds : Nat}

public let now : () -> Time

type TimerId = Nat

public func toNanoseconds(duration : Duration) : Nat

public func setTimer(duration : Duration, job : () -> async ()) : TimerId

public func recurringTimer(duration : Duration, job : () -> async ()) : TimerId

public let cancelTimer : TimerId -> ()