Function in clock compiler

wall_nanos

fn wall_nanos() -> int
Import
use clock::{wall_nanos};
Source: compiler/src/builtin_docs/clock.hy

Returns the current wall-clock time in nanoseconds since the Unix epoch (UTC).

The wall clock can jump (NTP, manual changes); measure durations with mono_nanos instead. For dates, formatting and parsing, use the coil-time package.

Returns#

int

Examples#

use clock::{wall_nanos};
use tests::assert;
let secs = wall_nanos() / 1000000000;
assert!(secs > 1600000000);

See also#

↑ ↓ navigate ↵ open