mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-01-18 12:52:44 +01:00
tests/event: fix ztimer_usec ifdef
This commit is contained in:
parent
265185ffea
commit
3bea71affd
@ -28,7 +28,7 @@
|
|||||||
#include "event.h"
|
#include "event.h"
|
||||||
#include "event/timeout.h"
|
#include "event/timeout.h"
|
||||||
#include "event/callback.h"
|
#include "event/callback.h"
|
||||||
#if IS_USED(MODULE_ZTIMER)
|
#if IS_USED(MODULE_ZTIMER_USEC)
|
||||||
#include "ztimer.h"
|
#include "ztimer.h"
|
||||||
#else
|
#else
|
||||||
#include "xtimer.h"
|
#include "xtimer.h"
|
||||||
@ -88,7 +88,7 @@ static void timed_callback(void *arg)
|
|||||||
order++;
|
order++;
|
||||||
expect(order == 6);
|
expect(order == 6);
|
||||||
expect(arg == event_callback.arg);
|
expect(arg == event_callback.arg);
|
||||||
#if IS_USED(MODULE_ZTIMER)
|
#if IS_USED(MODULE_ZTIMER_USEC)
|
||||||
uint32_t now = ztimer_now(ZTIMER_USEC);
|
uint32_t now = ztimer_now(ZTIMER_USEC);
|
||||||
#else
|
#else
|
||||||
uint32_t now = xtimer_now_usec();
|
uint32_t now = xtimer_now_usec();
|
||||||
@ -186,7 +186,7 @@ int main(void)
|
|||||||
|
|
||||||
puts("posting timed callback with timeout 1sec");
|
puts("posting timed callback with timeout 1sec");
|
||||||
event_timeout_init(&event_timeout, &queue, (event_t *)&event_callback);
|
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);
|
before = ztimer_now(ZTIMER_USEC);
|
||||||
#else
|
#else
|
||||||
before = xtimer_now_usec();
|
before = xtimer_now_usec();
|
||||||
|
Loading…
Reference in New Issue
Block a user