OxL Reference

op Inst.-

The duration between two readings of the monotonic clock.

Example:

oxl✓ checked in CI
use std.time { Instant }

fn main() io, time {
  let a = Instant.now()
  let b = Instant.now()
  print("{(b - a).isNegative()}")
}
Output
false
pub(api) static op -(a: Inst, b: Inst) -> Dur

Since. 1.0.0-beta

Parameters

NameType
aInst
bInst

Returns

Dur

Effects

none declared (pure unless the body says otherwise)

Defined in: std/time/time.oxl:2072

See also