Skip to main content

SystemTimeSync

Trait SystemTimeSync 

Source
pub trait SystemTimeSync {
    // Required method
    fn set_system_time(
        elapsed_from_epoch: Duration,
    ) -> Result<(), SystemTimeError>;
}
Expand description

Allows manual synchronization of SystemTime.

Required Methods§

Source

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

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§