pub struct Timer {
pub handle: TimerHandle,
/* private fields */
}Fields§
§handle: TimerHandleImplementations§
Source§impl Timer
impl Timer
pub fn new_with_to_tick<F>(
name: &str,
timer_period_in_ticks: impl ToTick,
auto_reload: bool,
param: Option<TimerParam>,
callback: F,
) -> Result<Self>where
F: Fn(Box<dyn TimerFn>, Option<TimerParam>) -> Result<TimerParam> + Send + Sync + Clone + 'static,
pub fn start_with_to_tick(&self, ticks_to_wait: impl ToTick) -> OsalRsBool
pub fn stop_with_to_tick(&self, ticks_to_wait: impl ToTick) -> OsalRsBool
pub fn reset_with_to_tick(&self, ticks_to_wait: impl ToTick) -> OsalRsBool
pub fn change_period_with_to_tick( &self, new_period_in_ticks: impl ToTick, new_period_ticks: impl ToTick, ) -> OsalRsBool
pub fn delete_with_to_tick(&mut self, ticks_to_wait: impl ToTick) -> OsalRsBool
Trait Implementations§
Source§impl Timer for Timer
impl Timer for Timer
fn new<F>(
name: &str,
timer_period_in_ticks: TickType,
auto_reload: bool,
param: Option<TimerParam>,
callback: F,
) -> Result<Self>where
F: Fn(Box<dyn TimerFn>, Option<TimerParam>) -> Result<TimerParam> + Send + Sync + Clone + 'static,
fn start(&self, ticks_to_wait: TickType) -> OsalRsBool
fn stop(&self, ticks_to_wait: TickType) -> OsalRsBool
fn reset(&self, ticks_to_wait: TickType) -> OsalRsBool
fn change_period( &self, new_period_in_ticks: TickType, new_period_ticks: TickType, ) -> OsalRsBool
fn delete(&mut self, ticks_to_wait: TickType) -> OsalRsBool
impl Send for Timer
impl Sync for Timer
Auto Trait Implementations§
impl Freeze for Timer
impl !RefUnwindSafe for Timer
impl Unpin for Timer
impl !UnwindSafe for Timer
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more