Module time

Source
Expand description

Current time functionality.

This module provides the now function to fetch the current time as seconds since the epoch. Note that now can return Error in case the current time is before the epoch.

Structs§

Error
Wraps SystemTimeError to provide diagnostics.

Constants§

CURRENT_TIME_BEFORE_EPOCH
The error message for when the system time is before the epoch.

Functions§

expect_now
Similar to now, but panics if the current time is before the epoch.
now
Returns the current time as seconds since the epoch.