#[derive(Copy, Clone, Debug, Eq, PartialEq)]
#[repr(u8)]
pub enum TimerPhase {
NotRunning = 0,
Running = 1,
Ended = 2,
Paused = 3,
}
impl TimerPhase {
pub const fn is_not_running(&self) -> bool {
matches!(self, Self::NotRunning)
}
pub const fn is_running(&self) -> bool {
matches!(self, Self::Running)
}
pub const fn is_ended(&self) -> bool {
matches!(self, Self::Ended)
}
pub const fn is_paused(&self) -> bool {
matches!(self, Self::Paused)
}
}