diff --git a/rtic-time/src/monotonic/embedded_hal_macros.rs b/rtic-time/src/monotonic/embedded_hal_macros.rs index 25ac791739..f3e857e2d9 100644 --- a/rtic-time/src/monotonic/embedded_hal_macros.rs +++ b/rtic-time/src/monotonic/embedded_hal_macros.rs @@ -11,7 +11,7 @@ macro_rules! impl_embedded_hal_delay_fugit { now + ::Duration::nanos_at_least(ns.into()); if now != done { // Compensate for sub-tick uncertainty - done = done + ::Duration::from_ticks(1); + done += ::Duration::from_ticks(1); } while ::now() < done {} @@ -35,7 +35,7 @@ macro_rules! impl_embedded_hal_delay_fugit { now + ::Duration::millis_at_least(ms.into()); if now != done { // Compensate for sub-tick uncertainty - done = done + ::Duration::from_ticks(1); + done += ::Duration::from_ticks(1); } while ::now() < done {}