mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-12-28 16:01:18 +01:00
ztimer: fix ztimer_spin() time_left == duration case
This commit is contained in:
parent
2c6693d68e
commit
07a1dde684
@ -456,7 +456,7 @@ void ztimer_sleep(ztimer_clock_t *clock, uint32_t duration);
|
||||
*/
|
||||
static inline void ztimer_spin(ztimer_clock_t *clock, uint32_t duration) {
|
||||
uint32_t end = ztimer_now(clock) + duration;
|
||||
while ((end - ztimer_now(clock)) < duration) {}
|
||||
while ((end - ztimer_now(clock)) <= duration) {}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user