forked from M-Labs/zynq-rs
1
0
Fork 0

timer::global::CountDown: fix delaying from "up to" to "at least" the timespan

This commit is contained in:
Astro 2020-07-22 22:43:10 +02:00
parent 855d94c48e
commit 7f45d10af3
1 changed files with 1 additions and 1 deletions

View File

@ -110,7 +110,7 @@ impl embedded_hal::timer::CountDown for CountDown {
}
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)
} else {
Ok(())