1
This commit is contained in:
parent
a8535d4da8
commit
231be446d1
10
src/timer.rs
10
src/timer.rs
@ -97,8 +97,8 @@ impl Timer {
|
||||
self.timer_tick = (self.get_tick_count)();
|
||||
let self_wp = self.shared_from_self();
|
||||
let cb = Box::new(
|
||||
move |_event: TimerEvent, _args: Option<Vec<Rc::<dyn Any>>>| {
|
||||
self_wp.borrow_mut().gc_timer(_event, _args);
|
||||
move |event: TimerEvent, args: Option<Vec<Rc::<dyn Any>>>| {
|
||||
self_wp.borrow_mut().gc_timer(event, args);
|
||||
}
|
||||
);
|
||||
|
||||
@ -171,9 +171,9 @@ impl Timer {
|
||||
while !self.work_list.borrow().empty() {
|
||||
let timer = &self.work_list.borrow().first_entry();
|
||||
self.running_timer = timer.clone();
|
||||
match &timer.upgrade().unwrap().borrow_mut().cb {
|
||||
Some(_v) => {
|
||||
//(*v)(0, None);
|
||||
match &mut timer.upgrade().unwrap().borrow_mut().cb {
|
||||
Some(v) => {
|
||||
(*v)(TimerEvent::Exec, None);
|
||||
}
|
||||
None => {
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user