1
This commit is contained in:
parent
eb8316b98b
commit
3b644b460c
@ -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();
|
||||
|
@ -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 {
|
||||
|
Loading…
x
Reference in New Issue
Block a user