From b45f4236deb1681c8ebb919193d2e5930e95343d Mon Sep 17 00:00:00 2001 From: Kaspar Schleiser Date: Wed, 4 Mar 2020 11:07:22 +0100 Subject: [PATCH] sys/ztimer: make ztimer_overhead() return signed value (int32_t) --- sys/include/ztimer/overhead.h | 2 +- sys/ztimer/overhead.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/include/ztimer/overhead.h b/sys/include/ztimer/overhead.h index 86637fc32e..521667053c 100644 --- a/sys/include/ztimer/overhead.h +++ b/sys/include/ztimer/overhead.h @@ -41,7 +41,7 @@ extern "C" { * @param[in] base base interval to use * @return (time from ztimer_set() until callback) - base */ -uint32_t ztimer_overhead(ztimer_clock_t *clock, uint32_t base); +int32_t ztimer_overhead(ztimer_clock_t *clock, uint32_t base); #endif /* ZTIMER_OVERHEAD_H */ /** @} */ diff --git a/sys/ztimer/overhead.c b/sys/ztimer/overhead.c index 6502f49cc3..c8d792a0cb 100644 --- a/sys/ztimer/overhead.c +++ b/sys/ztimer/overhead.c @@ -35,7 +35,7 @@ static void _callback(void *arg) *callback_arg->val = ztimer_now(callback_arg->clock); } -uint32_t ztimer_overhead(ztimer_clock_t *clock, uint32_t base) +int32_t ztimer_overhead(ztimer_clock_t *clock, uint32_t base) { volatile uint32_t after = 0; uint32_t pre;