forked from M-Labs/zynq-rs
timer::global::CountDown: fix delaying from "up to" to "at least" the timespan
This commit is contained in:
parent
855d94c48e
commit
7f45d10af3
@ -110,7 +110,7 @@ impl embedded_hal::timer::CountDown for CountDown {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn wait(&mut self) -> nb::Result<(), Void> {
|
fn wait(&mut self) -> nb::Result<(), Void> {
|
||||||
if self.timer.get_time() < self.timeout {
|
if self.timer.get_time() <= self.timeout {
|
||||||
Err(nb::Error::WouldBlock)
|
Err(nb::Error::WouldBlock)
|
||||||
} else {
|
} else {
|
||||||
Ok(())
|
Ok(())
|
||||||
|
Loading…
Reference in New Issue
Block a user