This commit is contained in:
azw 2023-11-11 09:47:56 +00:00
parent 3b644b460c
commit eb14a702c3

View File

@ -261,7 +261,10 @@ impl XTimer {
pub fn update(this: &Rc::<RefCell::<XTimer>>) { pub fn update(this: &Rc::<RefCell::<XTimer>>) {
let tick = (*this.borrow().get_tick_count.as_ref().unwrap())(); let tick = (*this.borrow().get_tick_count.as_ref().unwrap())();
let work_list = this.borrow().work_list.clone(); let work_list = this.borrow().work_list.clone();
while this.borrow_mut().fetch_work_list(tick) { loop {
if !this.borrow_mut().fetch_work_list(tick) {
break;
}
while !work_list.borrow().empty() { while !work_list.borrow().empty() {
{ {
let timer = &work_list.borrow().first_entry(); let timer = &work_list.borrow().first_entry();