This commit is contained in:
azw 2023-11-11 09:10:57 +00:00
parent eb8316b98b
commit 3b644b460c
2 changed files with 5 additions and 4 deletions

View File

@ -158,7 +158,7 @@ impl App {
pub fn run() {
loop {
crate::Timer::instance().borrow_mut().update();
crate::Timer::update();
std::thread::sleep(Duration::from_millis(1));
//self.dispatch_immsg();
//self.dispatch_httprequest();

View File

@ -58,9 +58,10 @@ impl Timer {
self.base.borrow_mut().uninit();
}
pub fn update(&mut self) {
r9::xtimer::XTimer::update(&self.base);
//return self.base.borrow_mut().update();
pub fn update() {
//r9::xtimer::XTimer::update(&self.base);
let base = Timer::instance().borrow_mut().base.clone();
r9::xtimer::XTimer::update(&base);
}
pub fn set_timeout(&mut self, time: i32, cb: TimerCb) -> TimerWp {