Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/timer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,12 @@ pub trait CountDown {
fn wait(&mut self) -> nb::Result<(), Self::Error>;
}

/// A count down timer that allows reading out elapsed time since start.
pub trait Elapsed: CountDown {
/// The units of time that elapsed since the timer was started.
fn elapsed(&self) -> Result<Self::Time, Self::Error>;
}

/// Marker trait that indicates that a timer is periodic
pub trait Periodic {}

Expand Down