From 3a9923e2ce87602f4b5d25fcc537fc0548afc4e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jere=20Lepp=C3=A4nen?= Date: Tue, 17 Oct 2023 12:20:01 +0300 Subject: [PATCH] example: timer_accuracy: fix schedule wait time MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Schedule wait time is not in nanoseconds. Convert by calling odp_schedule_wait_time(). Signed-off-by: Jere Leppänen --- example/timer/odp_timer_accuracy.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/example/timer/odp_timer_accuracy.c b/example/timer/odp_timer_accuracy.c index 4bea7d680fa..ff6794166f4 100644 --- a/example/timer/odp_timer_accuracy.c +++ b/example/timer/odp_timer_accuracy.c @@ -1028,6 +1028,7 @@ static int run_test(void *arg) uint64_t tmo_ns; timer_ctx_t *ctx; odp_thrmask_t mask; + uint64_t wait = odp_schedule_wait_time(10 * ODP_TIME_MSEC_IN_NS); odp_schedule_group_t group = ODP_SCHED_GROUP_INVALID; test_log_t *log = test_global->log; enum mode_e mode = test_global->opt.mode; @@ -1062,7 +1063,7 @@ static int run_test(void *arg) odp_barrier_wait(&test_global->barrier); while (1) { - ev = odp_schedule(NULL, 10 * ODP_TIME_MSEC_IN_NS); + ev = odp_schedule(NULL, wait); time = odp_time_global_strict(); if (ev == ODP_EVENT_INVALID) {