Skip to content
CryoCryo home
StdlibSystem

time

Spans and clocks. Duration measures a length of time, Instant reads the monotonic clock, SystemTime reads the wall clock, and DateTime breaks a timestamp into UTC calendar parts.

All four types are POD — copied by value, nothing to drop. Every difference saturates at zero rather than wrapping. A plain import std::time; brings in the whole module.

public module time::duration;
public module time::clock;
public module time::datetime;
FileWhat it holdsImport
durationDurationimport std::time::duration;
clockInstant, SystemTime, sleepimport std::time::clock;
datetimeDateTimeimport std::time::datetime;