mirror of
https://github.com/obgm/libcoap.git
synced 2026-11-26 08:51:42 +03:00
[RIOT] coap_time.h: fix COAP_TICKS_PER_SECOND for undefined XTIMER_HZ
With ztimer usage, XTIMER_HZ is not defined anymore in xtimer.h. As a workaround, XTIMER_HZ_BASE is used.
This commit is contained in:
1 parent
05e7f12d7c
commit
54dbc3eeb8
1 file changed
+4
@@ -88,7 +88,11 @@ COAP_STATIC_INLINE uint64_t coap_ticks_to_rt_us(coap_tick_t t) {
|
||||
#elif defined(RIOT_VERSION)
|
||||
#include <xtimer.h>
|
||||
|
||||
#ifdef XTIMER_HZ
|
||||
#define COAP_TICKS_PER_SECOND (XTIMER_HZ)
|
||||
#else /* XTIMER_HZ */
|
||||
#define COAP_TICKS_PER_SECOND (XTIMER_HZ_BASE)
|
||||
#endif /* XTIMER_HZ */
|
||||
|
||||
typedef uint64_t coap_tick_t;
|
||||
typedef int64_t coap_tick_diff_t;
|
||||
|
||||
Reference in new issue
Block a user