pub trait SystemTimeSync {
// Required method
fn set_system_time(
elapsed_from_epoch: Duration,
) -> Result<(), SystemTimeError>;
}Available on crate feature
osal-freertos only.Expand description
Allows manual synchronization of SystemTime.
Required Methods§
Sourcefn set_system_time(elapsed_from_epoch: Duration) -> Result<(), SystemTimeError>
fn set_system_time(elapsed_from_epoch: Duration) -> Result<(), SystemTimeError>
Updates the current system time.
Use this to synchronize with real-world clock (e.g., provide time obtained from NTP).
§Errors
SystemTimeError::EpochIsLaterThanStartTimewhen the provided duration is less than the program’s execution time.
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.