pub trait Clock: Send + Sync {
// Required method
fn now(&self) -> u64;
}Expand description
A wall clock used to check certificate validity periods.
Returns the current Unix timestamp (seconds since epoch). This trait
exists so that no_std environments can inject their own time source
(hardware RTC, NTP, etc.) instead of relying on std::time::SystemTime.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementors§
impl Clock for SystemClock
Available on crate feature
std only.