Struct embedded_time::timer::Timer [−][src]
Expand description
A Timer
counts toward an expiration, can be polled for elapsed and remaining time, and can be
one-shot or continuous/periodic.
Implementations
impl<'a, Type, State, Clock: Clock, Dur: Duration> Timer<'a, Type, State, Clock, Dur>
[src]
impl<'a, Type, State, Clock: Clock, Dur: Duration> Timer<'a, Type, State, Clock, Dur>
[src]pub fn into_oneshot(self) -> Timer<'a, OneShot, State, Clock, Dur>
[src]
pub fn into_oneshot(self) -> Timer<'a, OneShot, State, Clock, Dur>
[src]Change timer type to one-shot
pub fn into_periodic(self) -> Timer<'a, Periodic, State, Clock, Dur>
[src]
pub fn into_periodic(self) -> Timer<'a, Periodic, State, Clock, Dur>
[src]Change timer type into periodic
impl<Type, Clock: Clock, Dur: Duration> Timer<'_, Type, Running, Clock, Dur>
[src]
impl<Type, Clock: Clock, Dur: Duration> Timer<'_, Type, Running, Clock, Dur>
[src]pub fn elapsed(&self) -> Result<Dur, TimeError> where
Dur: FixedPoint + TryFrom<Generic<Clock::T>, Error = ConversionError>,
Dur::T: TryFrom<Clock::T>,
Clock::T: TryFrom<Dur::T>,
[src]
pub fn elapsed(&self) -> Result<Dur, TimeError> where
Dur: FixedPoint + TryFrom<Generic<Clock::T>, Error = ConversionError>,
Dur::T: TryFrom<Clock::T>,
Clock::T: TryFrom<Dur::T>,
[src]impl<Clock: Clock, Dur: Duration> Timer<'_, Periodic, Running, Clock, Dur>
[src]
impl<Clock: Clock, Dur: Duration> Timer<'_, Periodic, Running, Clock, Dur>
[src]Trait Implementations
impl<'a, Type: Debug, State: Debug, Clock: Debug + Clock, Dur: Debug + Duration> Debug for Timer<'a, Type, State, Clock, Dur>
[src]
impl<'a, Type: Debug, State: Debug, Clock: Debug + Clock, Dur: Debug + Duration> Debug for Timer<'a, Type, State, Clock, Dur>
[src]Auto Trait Implementations
impl<'a, Type, State, Clock, Dur> Send for Timer<'a, Type, State, Clock, Dur> where
Clock: Sync,
Dur: Send,
State: Send,
Type: Send,
<Clock as Clock>::T: Send,
Clock: Sync,
Dur: Send,
State: Send,
Type: Send,
<Clock as Clock>::T: Send,
impl<'a, Type, State, Clock, Dur> Sync for Timer<'a, Type, State, Clock, Dur> where
Clock: Sync,
Dur: Sync,
State: Sync,
Type: Sync,
<Clock as Clock>::T: Sync,
Clock: Sync,
Dur: Sync,
State: Sync,
Type: Sync,
<Clock as Clock>::T: Sync,
impl<'a, Type, State, Clock, Dur> Unpin for Timer<'a, Type, State, Clock, Dur> where
Dur: Unpin,
State: Unpin,
Type: Unpin,
<Clock as Clock>::T: Unpin,
Dur: Unpin,
State: Unpin,
Type: Unpin,
<Clock as Clock>::T: Unpin,