pub trait TimeSource {
type Instant: Copy + Clone + PartialEq + PartialOrd;
// Required methods
fn now(&self) -> Self::Instant;
fn is_elapsed(&self, since: Self::Instant, timeout_ms: u64) -> bool;
}
Expand description
Minimal time provider trait for timeout tracking. Implement this for your platform.
Required Associated Types§
Required Methods§
Sourcefn is_elapsed(&self, since: Self::Instant, timeout_ms: u64) -> bool
fn is_elapsed(&self, since: Self::Instant, timeout_ms: u64) -> bool
Check if a timeout has occurred