OxL Reference

op Tm.-

The duration between two instants.

Example:

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

fn main() io {
  print("{(Time.ofUnixSeconds(100) - Time.ofUnixSeconds(40)).seconds()}")
}
Output
60
pub(api) static op -(a: Tm, b: Tm) -> Dur

Since. 1.0.0-beta

Parameters

NameType
aTm
bTm

Returns

Dur

Effects

none declared (pure unless the body says otherwise)

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

See also