aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJere Leppänen <jere.leppanen@nokia.com>2023-10-17 12:20:01 +0300
committerMatias Elo <matias.elo@nokia.com>2023-10-18 08:19:40 +0300
commit3fc1ee279b56434ed2beedf645bccb6ca0708ffc (patch)
tree76930e526b40bbb96246b9a853f3bbac799b3dd0
parent1d5603ae9ce0e7a1fa86030b25da9e88713b807c (diff)
example: timer_accuracy: fix schedule wait time
Schedule wait time is not in nanoseconds. Convert by calling odp_schedule_wait_time(). Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com> Reviewed-by: Matias Elo <matias.elo@nokia.com>
-rw-r--r--example/timer/odp_timer_accuracy.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/example/timer/odp_timer_accuracy.c b/example/timer/odp_timer_accuracy.c
index 4bea7d680..ff6794166 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) {