diff --git a/tests/trickle/main.c b/tests/trickle/main.c index d8859d9d32..d5a246d794 100644 --- a/tests/trickle/main.c +++ b/tests/trickle/main.c @@ -23,6 +23,11 @@ #include "trickle.h" #include "thread.h" #include "msg.h" +#if IS_USED(MODULE_ZTIMER_MSEC) +#include "ztimer.h" +#else +#include "xtimer.h" +#endif #define TRICKLE_MSG (0xfeef) #define TR_IMIN (8) @@ -45,7 +50,11 @@ static trickle_t trickle = { .callback = { .func = &callback, static void callback(void *args) { (void) args; +#if IS_USED(MODULE_ZTIMER_MSEC) + uint32_t now = ztimer_now(ZTIMER_MSEC); +#else uint32_t now = xtimer_now_usec(); +#endif printf("now = %" PRIu32 ", t = %" PRIu32 "\n", now, trickle.t);