//! Traits for time management primitives.

use core::time::Duration;

pub trait TimeManager {

    /// Return the clock frequency, meaning the resolution of the 
    /// time mesurement.
    fn frequency(&self) -> u64;

    /// The uptime since last power-on.
    fn uptime(&self) -> Duration;

    /// Sleep for the duration.
    fn sleep(&self, duration: Duration);
}
