Skip to main content

TimeSource

Trait TimeSource 

Source
pub trait TimeSource {
    // Required method
    fn unix_secs(&self) -> u64;
}
Expand description

Supplies whole seconds since the Unix epoch.

Required Methods§

Source

fn unix_secs(&self) -> u64

Returns seconds since 1970-01-01 UTC.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§

Source§

impl TimeSource for StaticTimeSource

Source§

impl TimeSource for StdTimeSource

Available on crate feature std only.