OxL Reference

method Dur.ofNanos

A duration of n microseconds.

Example:

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

fn main() io {
  print("{Duration.ofMicros(3).nanos()}")
}
Output
3000

A duration of n nanoseconds.

Example:

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

fn main() io {
  print("{Duration.ofNanos(1500).nanos()}")
}
Output
1500
pub(api) static fn ofNanos(n: i64) -> Dur

Since. 1.0.0-beta

Parameters

NameType
ni64

Returns

Dur

Effects

none declared (pure unless the body says otherwise)

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

See also