std/time
Wall-clock time: points in time (Instant) and the spans between them (Duration).
Both are a count of nanoseconds in an Int64 and nothing else, so they cost what the number costs: comparing and
subtracting them is integer arithmetic, and only reading the clock goes to the operating system.
Modules
std/time/libWall-clock time: points in time (Instant) and the spans between them (Duration).
Everything
- type
ClockThe wall clock. - type
DurationThe span between twoInstants, or a length of time asked for on its own (2.seconds()). - type
InstantA point in time. - extend
Int64The short way to write a [Duration]:2.seconds()instead of a constructor. - fn
sleepSuspends the running task for this many seconds. - type
TimestampA point on the wall clock: nanoseconds since 1970-01-01 00:00:00 UTC.