Skip to main content

unix_ns

Function unix_ns 

Source
pub fn unix_ns() -> u128
Available on crate feature std only.
Expand description

Returns the current Unix time in whole nanoseconds.

Shortcut for wall().unix_nanos(). Returns zero if the system clock is set to a moment before the Unix epoch.

ยงExamples

use clock_lib as clock;

let now = clock::unix_ns();
assert!(now > 0);