Skip to content

Commit

Permalink
example: timer_accuracy: fix schedule wait time
Browse files Browse the repository at this point in the history
Schedule wait time is not in nanoseconds. Convert by calling
odp_schedule_wait_time().

Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com>
  • Loading branch information
JereLeppanen committed Oct 17, 2023
1 parent 1835c26 commit 3a9923e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion example/timer/odp_timer_accuracy.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit 3a9923e

Please sign in to comment.