1
This commit is contained in:
parent
eb8316b98b
commit
3b644b460c
@ -158,7 +158,7 @@ impl App {
|
|||||||
|
|
||||||
pub fn run() {
|
pub fn run() {
|
||||||
loop {
|
loop {
|
||||||
crate::Timer::instance().borrow_mut().update();
|
crate::Timer::update();
|
||||||
std::thread::sleep(Duration::from_millis(1));
|
std::thread::sleep(Duration::from_millis(1));
|
||||||
//self.dispatch_immsg();
|
//self.dispatch_immsg();
|
||||||
//self.dispatch_httprequest();
|
//self.dispatch_httprequest();
|
||||||
|
@ -58,9 +58,10 @@ impl Timer {
|
|||||||
self.base.borrow_mut().uninit();
|
self.base.borrow_mut().uninit();
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn update(&mut self) {
|
pub fn update() {
|
||||||
r9::xtimer::XTimer::update(&self.base);
|
//r9::xtimer::XTimer::update(&self.base);
|
||||||
//return self.base.borrow_mut().update();
|
let base = Timer::instance().borrow_mut().base.clone();
|
||||||
|
r9::xtimer::XTimer::update(&base);
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn set_timeout(&mut self, time: i32, cb: TimerCb) -> TimerWp {
|
pub fn set_timeout(&mut self, time: i32, cb: TimerCb) -> TimerWp {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user