Expand description
Countdown timer component.
This module provides a countdown timer that ticks down from a specified duration and sends timeout messages when complete.
§Example
use bubbles::timer::Timer;
use std::time::Duration;
let timer = Timer::new(Duration::from_secs(60));
assert_eq!(timer.remaining(), Duration::from_secs(60));
assert!(!timer.timed_out());Structs§
- Start
Stop Msg - Message to start or stop the timer.
- TickMsg
- Message sent on every timer tick.
- Timeout
Msg - Message sent once when the timer times out.
- Timer
- Countdown timer model.