This commit is contained in:
Quaternions 2024-07-31 14:05:52 -07:00
parent 852bbe6dad
commit b55ba418aa

View File

@ -1,7 +1,7 @@
use crate::integer::{Time,Ratio64}; use crate::integer::{Time,Ratio64};
pub struct Paused{} pub struct Paused;
pub struct Unpaused{} pub struct Unpaused;
pub trait PauseState{ pub trait PauseState{
const IS_PAUSED:bool; const IS_PAUSED:bool;
@ -126,7 +126,7 @@ impl<T:TimerState,P:PauseState> TimerFixed<T,P>{
let new_time=self.time(time); let new_time=self.time(time);
let mut timer=TimerFixed{ let mut timer=TimerFixed{
state:self.state, state:self.state,
paused:Paused{}, paused:Paused,
}; };
timer.set_time(time,new_time); timer.set_time(time,new_time);
Ok(timer) Ok(timer)
@ -139,7 +139,7 @@ impl<T:TimerState,P:PauseState> TimerFixed<T,P>{
let new_time=self.time(time); let new_time=self.time(time);
let mut timer=TimerFixed{ let mut timer=TimerFixed{
state:self.state, state:self.state,
paused:Unpaused{}, paused:Unpaused,
}; };
timer.set_time(time,new_time); timer.set_time(time,new_time);
Ok(timer) Ok(timer)