DoxigAlpha

Instant

An Instant represents a timestamp with respect to the currently executing program that ticks during suspend and can be used to record elapsed time unlike nanoTimestamp.

It tries to sample the system's fastest and most precise timer available. It also tries to be monotonic, but this is not a guarantee due to OS/hardware bugs. If you need monotonic readings for elapsed time, consider Timer instead.

Fields of this type

Fields

#
timestamp:if (is_posix) posix.timespec else u64

Queries the system for the current moment of time as an Instant.

Functions

#
now
Queries the system for the current moment of time as an Instant.
order
Quickly compares two instances between each other.
since
Returns elapsed time in nanoseconds since the `earlier` Instant.