1
This commit is contained in:
parent
26edaf0cf6
commit
a69795e9dd
@ -66,18 +66,16 @@ pub struct XTimer {
|
||||
get_tick_count: Option<Box<dyn Fn () -> i64>>,
|
||||
cache_timer_num: i32,
|
||||
work_list: TimerListListHeadRp,
|
||||
tv0: [Option<TimerListListHeadRp>; TVR_SIZE],
|
||||
tv1: [TimerListListHeadRp; TVR_SIZE],
|
||||
tv2: [TimerListListHeadRp; TVN_SIZE],
|
||||
tv3: [TimerListListHeadRp; TVN_SIZE],
|
||||
tv4: [TimerListListHeadRp; TVN_SIZE],
|
||||
tv5: [TimerListListHeadRp; TVN_SIZE],
|
||||
tv1: Vec<TimerListListHeadRp>,
|
||||
tv2: Vec<TimerListListHeadRp>,
|
||||
tv3: Vec<TimerListListHeadRp>,
|
||||
tv4: Vec<TimerListListHeadRp>,
|
||||
tv5: Vec<TimerListListHeadRp>,
|
||||
_self_wp: Weak::<RefCell::<Self>>,
|
||||
}
|
||||
|
||||
impl XTimer {
|
||||
|
||||
/*
|
||||
pub fn new() -> Rc::<RefCell::<Self>> {
|
||||
let t: TimerListListHeadRp = Default::default();
|
||||
let this = Rc::new(RefCell::new(XTimer{
|
||||
@ -88,17 +86,16 @@ impl XTimer {
|
||||
get_tick_count: Default::default(),
|
||||
cache_timer_num: 0,
|
||||
work_list: Default::default(),
|
||||
tv0: [None; TVR_SIZE],
|
||||
tv1: [t.clone(); TVR_SIZE],
|
||||
tv2: [Default::default(); TVN_SIZE],
|
||||
tv3: [Default::default(); TVN_SIZE],
|
||||
tv4: [Default::default(); TVN_SIZE],
|
||||
tv5: [Default::default(); TVN_SIZE],
|
||||
tv1: Vec::with_capacity(TVR_SIZE),
|
||||
tv2: Vec::with_capacity(TVN_SIZE),
|
||||
tv3: Vec::with_capacity(TVN_SIZE),
|
||||
tv4: Vec::with_capacity(TVN_SIZE),
|
||||
tv5: Vec::with_capacity(TVN_SIZE),
|
||||
_self_wp: Default::default(),
|
||||
}));
|
||||
this.borrow_mut()._self_wp = Rc::downgrade(&this);
|
||||
return this;
|
||||
}*/
|
||||
}
|
||||
|
||||
pub fn init(&mut self,
|
||||
get_tick_count: Box<dyn Fn () -> i64>,
|
||||
@ -116,7 +113,6 @@ impl XTimer {
|
||||
self.timer_tick = (*v)();
|
||||
}
|
||||
None => {
|
||||
|
||||
}
|
||||
}
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user