Skip to content

Commit 32dc53f

Browse files
committed
[Time] Fix rollover
Signed-off-by: Frederic.Pillon <[email protected]>
1 parent 5e694ae commit 32dc53f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cores/arduino/wiring_time.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ static inline void delayMicroseconds(uint32_t us)
7070
while ((int32_t)dwt_getCycles() - start < cycles);
7171
#else
7272
uint32_t start = getCurrentMicros();
73-
while ((start + us) > getCurrentMicros());
73+
while (getCurrentMicros() - start < us);
7474
#endif
7575
}
7676

0 commit comments

Comments
 (0)