pub(crate) trait SystemTime {
// Required method
fn duration_since_epoch() -> Result<Duration, SystemTimeError>;
}Expand description
Provides a measurement of the system time.
Required Methods§
Sourcefn duration_since_epoch() -> Result<Duration, SystemTimeError>
fn duration_since_epoch() -> Result<Duration, SystemTimeError>
Calculates the Duration elapsed since epoch.
§Notes
OSAL implementations might require time to be synchronized by using the SystemTimeSync before using this
function. Review the documentation on the implementation you are using to learn platform-specific information.
§Errors
SystemTimeError::Unsynchronizedwhen system was not synchronized previously.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.