Searched refs:TimerFunction (Results 1 – 3 of 3) 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
31 pub trait TimerFunction: Send + Sync { trait46 impl TimerFunction for WakeUpHelper {64 pub fn new(timer_func: Box<dyn TimerFunction>, expire_jiffies: u64) -> Arc<Self> { in new() argument118 pub timer_func: Box<dyn TimerFunction>,
10 time::timer::{next_n_ms_timer_jiffies, Timer, TimerFunction},19 impl TimerFunction for NetWorkPollFunc {