Instant

struct Instant

A reading from the process-local monotonic clock.

Instants are suitable for elapsed time and deadlines, not wall-clock dates. Their numeric anchor is arbitrary and meaningful only when compared with another Instant produced in the same process.

Methods

static func now() -> Instant

Reads the host's monotonic clock.

The returned anchor is process-local and arbitrary; only differences and ordering against other process-local instants are meaningful.

View Source
pub static func now() -> Instant {
	#unsafe { Instant(nanos: _io_monotonic_nanos()) }
}