mirror of
https://github.com/rtic-rs/rtic.git
synced 2024-11-29 15:04:32 +01:00
cleanup
This commit is contained in:
parent
aaa92ea2fa
commit
0658d53843
1 changed files with 2 additions and 7 deletions
|
@ -72,14 +72,13 @@ where
|
||||||
|
|
||||||
if let Some(instant) = self.0.peek().map(|p| p.instant) {
|
if let Some(instant) = self.0.peek().map(|p| p.instant) {
|
||||||
if instant < Mono::now() {
|
if instant < Mono::now() {
|
||||||
// instant < now
|
|
||||||
// task became ready
|
// task became ready
|
||||||
let nr = self.0.pop_unchecked();
|
let nr = self.0.pop_unchecked();
|
||||||
|
|
||||||
Some((nr.task, nr.index))
|
Some((nr.task, nr.index))
|
||||||
} else {
|
} else {
|
||||||
// TODO: Fix this hack...
|
// TODO: Fix this hack...
|
||||||
// Extract the compare time
|
// Extract the compare time.
|
||||||
Mono::set_compare(*instant.duration_since_epoch().integer());
|
Mono::set_compare(*instant.duration_since_epoch().integer());
|
||||||
|
|
||||||
// Double check that the instant we set is really in the future, else
|
// Double check that the instant we set is really in the future, else
|
||||||
|
@ -93,13 +92,9 @@ where
|
||||||
} else {
|
} else {
|
||||||
None
|
None
|
||||||
}
|
}
|
||||||
|
|
||||||
// Start counting down from the new reload
|
|
||||||
// mem::transmute::<_, SYST>(()).clear_current();
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// The queue is empty
|
// The queue is empty, disable the interrupt.
|
||||||
// mem::transmute::<_, SYST>(()).disable_interrupt();
|
|
||||||
disable_interrupt();
|
disable_interrupt();
|
||||||
|
|
||||||
None
|
None
|
||||||
|
|
Loading…
Reference in a new issue