Searched refs:TimerFunction (Results 1 – 4 of 4) sorted by relevance
9 …)`,timer_func为定时器要执行的操作,expire_jiffies为定时器的结束时间,`timer_func`参数的类型是实现了`TimerFunction`特性的结构体。在创建定时器后…15   定时器要执行的函数应实现`TimerFunction`特性,其定义如下:19 pub trait TimerFunction: Send + Sync {24   一种典型的实现方式是:新建一个零长的结构体,实现`TimerFunction`特性,然后在`run`函数中实现定时器要执行的操作。32 pub fn new(timer_func: Box<dyn TimerFunction>, expire_jiffies: u64) -> Arc<Self>37 - timer_func:定时器需要执行的函数对应的结构体,其实现了`TimerFunction`特性151 /// 为结构体实现TimerFunction特性152 impl TimerFunction for TimerExample {153 /// TimerFunction特性中的函数run
36 pub trait TimerFunction: Send + Sync + Debug { interface52 impl TimerFunction for WakeUpHelper {72 pub fn new(timer_func: Box<dyn TimerFunction>, expire_jiffies: u64) -> Arc<Self> { in new() argument133 pub timer_func: Box<dyn TimerFunction>,
17 timer::{clock, Timer, TimerFunction},170 impl TimerFunction for WatchdogTimerFunc {
10 time::timer::{next_n_ms_timer_jiffies, Timer, TimerFunction},21 impl TimerFunction for NetWorkPollFunc {