Struct freertos_rs::TaskDelayPeriodic
[−]
[src]
pub struct TaskDelayPeriodic { /* fields omitted */ }
Periodic delay timer.
Use inside a polling loop, for example: the loop polls this instance every second.
The method should_run
will return true once 30 seconds or more has elapsed
and it will then reset the timer for that period.
Methods
impl TaskDelayPeriodic
[src]
fn new<D: DurationTicks>(period: D) -> TaskDelayPeriodic
[src]
Create a new timer with the set period.
fn should_run(&mut self) -> bool
[src]
Has the set period passed? If it has, resets the internal timer.
fn set_period<D: DurationTicks>(&mut self, period: D)
[src]
Set a new delay period
fn reset(&mut self)
[src]
Reset the internal timer to zero.