1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

tests/event: fix ztimer_usec ifdef

This commit is contained in:
Francisco Molina 2021-11-18 22:20:32 +01:00 committed by Koen Zandberg
parent 265185ffea
commit 3bea71affd
No known key found for this signature in database
GPG Key ID: BA1718B37D79F51C

View File

@ -28,7 +28,7 @@
#include "event.h"
#include "event/timeout.h"
#include "event/callback.h"
#if IS_USED(MODULE_ZTIMER)
#if IS_USED(MODULE_ZTIMER_USEC)
#include "ztimer.h"
#else
#include "xtimer.h"
@ -88,7 +88,7 @@ static void timed_callback(void *arg)
order++;
expect(order == 6);
expect(arg == event_callback.arg);
#if IS_USED(MODULE_ZTIMER)
#if IS_USED(MODULE_ZTIMER_USEC)
uint32_t now = ztimer_now(ZTIMER_USEC);
#else
uint32_t now = xtimer_now_usec();
@ -186,7 +186,7 @@ int main(void)
puts("posting timed callback with timeout 1sec");
event_timeout_init(&event_timeout, &queue, (event_t *)&event_callback);
#if IS_USED(MODULE_ZTIMER)
#if IS_USED(MODULE_ZTIMER_USEC)
before = ztimer_now(ZTIMER_USEC);
#else
before = xtimer_now_usec();