Skip to content

Commit

Permalink
sys/ztimer/xtimer_compat: fix bug introduced in RIOT-OS#17690
Browse files Browse the repository at this point in the history
  • Loading branch information
kfessel committed Feb 25, 2022
1 parent d895a29 commit eb87cb7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions sys/include/ztimer/xtimer_compat.h
Original file line number Diff line number Diff line change
Expand Up @@ -142,16 +142,16 @@ static inline void xtimer_tsleep32(xtimer_ticks32_t ticks)
xtimer_usleep(xtimer_usec_from_ticks(ticks));
}

static inline uint64_t xtimer_tsleep64(xtimer_ticks64_t ticks)
static inline void xtimer_tsleep64(xtimer_ticks64_t ticks)
{
const uint32_t max_sleep = UINT32_MAX;
uint64_t time = xtimer_usec_from_ticks64(ticks);

while (time > max_sleep) {
xtimer_usleep(clock, max_sleep);
xtimer_usleep(max_sleep);
time -= max_sleep;
}
xtimer_usleep(clock, time);
xtimer_usleep(time);
}

static inline void xtimer_set(xtimer_t *timer, uint32_t offset)
Expand Down

0 comments on commit eb87cb7

Please sign in to comment.