diff --git a/tests/sys/sema_inv/Makefile b/tests/sys/sema_inv/Makefile index 4b55e60aa6..3cf52ac608 100644 --- a/tests/sys/sema_inv/Makefile +++ b/tests/sys/sema_inv/Makefile @@ -1,6 +1,7 @@ include ../Makefile.sys_common USEMODULE += sema_inv -USEMODULE += xtimer +USEMODULE += ztimer +USEMODULE += ztimer_msec include $(RIOTBASE)/Makefile.include diff --git a/tests/sys/sema_inv/main.c b/tests/sys/sema_inv/main.c index b9b05ff58c..c213be18d2 100644 --- a/tests/sys/sema_inv/main.c +++ b/tests/sys/sema_inv/main.c @@ -21,7 +21,7 @@ #include #include "sema_inv.h" -#include "xtimer.h" +#include "ztimer.h" char t1_stack[THREAD_STACKSIZE_SMALL]; char t2_stack[THREAD_STACKSIZE_SMALL]; @@ -38,7 +38,7 @@ static void *thread_count(void *arg) printf("THREAD %u start\n", ctx->id); - xtimer_msleep(5); + ztimer_sleep(ZTIMER_MSEC, 5); if (sema_inv_post(ctx->sync)) { printf("THREAD %u woke main thread\n", ctx->id); @@ -53,7 +53,7 @@ static void *thread_bit(void *arg) printf("THREAD %u start\n", ctx->id); - xtimer_msleep(5); + ztimer_sleep(ZTIMER_MSEC, 5); if (sema_inv_post_mask(ctx->sync, 1 << ctx->id)) { printf("THREAD %u woke main thread\n", ctx->id); @@ -86,7 +86,7 @@ static void test_counter_mode(void) puts("thread synced"); /* wait for all threads to terminate, we are going to re-use the stack */ - xtimer_msleep(50); + ztimer_sleep(ZTIMER_MSEC, 50); } static void test_mask_mode(void) @@ -113,7 +113,7 @@ static void test_mask_mode(void) puts("thread synced"); /* wait for all threads to terminate, we are going to re-use the stack */ - xtimer_msleep(50); + ztimer_sleep(ZTIMER_MSEC, 50); } int main(void)