Thalweg · API reference ← Main docs

Clock

Trait Clock 

Source
pub trait Clock: Send + Sync {
    // Required method
    fn now_epoch_s(&self) -> i64;
}
Expand description

A monotonic wall-clock source in UTC epoch seconds. Injected so token-cache expiry is testable without sleeping.

Required Methods§

Source

fn now_epoch_s(&self) -> i64

Current time as UTC seconds since the Unix epoch.

Implementors§