Module compiler

clock

Use mono_nanos to measure durations and wall_nanos for the time of day. For dates, time zones and formatting, use the coil-time package.

Built into the compiler.

Import what you use (use path::* is not allowed):

use clock::{wall_nanos, mono_nanos};

Functions#

NameDescription
wall_nanosReturns the current wall-clock time in nanoseconds since the Unix epoch (UTC).
mono_nanosReturns monotonic nanoseconds from a process-local starting point.
sleep_msPauses for at least ms milliseconds.
↑ ↓ navigate ↵ open