aboutsummaryrefslogtreecommitdiff
path: root/test/performance/odp_timer_perf.c
diff options
context:
space:
mode:
authorMatias Elo <matias.elo@nokia.com>2022-12-19 16:38:17 +0200
committerPetri Savolainen <petri.savolainen@nokia.com>2022-12-29 14:42:06 +0200
commit402a11745b270aa64a24d7f4338d491c7bd25bbf (patch)
treeff5aff98fab5c471450a23b7c2aefb1c94aab385 /test/performance/odp_timer_perf.c
parent9f55955a1d3c3f4c7476318749f0cbea23247657 (diff)
test: timer_perf: remove deprecated odp_timer_set_abs() function usage
Stop using deprecated odp_timer_set_abs() function. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com>
Diffstat (limited to 'test/performance/odp_timer_perf.c')
-rw-r--r--test/performance/odp_timer_perf.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/test/performance/odp_timer_perf.c b/test/performance/odp_timer_perf.c
index 998db628e..b09f9f60d 100644
--- a/test/performance/odp_timer_perf.c
+++ b/test/performance/odp_timer_perf.c
@@ -438,6 +438,7 @@ static int set_timers(test_global_t *global)
odp_event_t ev;
int status;
timer_ctx_t *ctx = &global->timer_ctx[i][j];
+ odp_timer_start_t start_param;
/* Set timers backwards, the last timer is set first */
if (j == 0)
@@ -456,9 +457,11 @@ static int set_timers(test_global_t *global)
tick_ns = odp_timer_ns_to_tick(tp, nsec);
nsec = nsec - period_ns;
- status = odp_timer_set_abs(timer, tick_cur + tick_ns,
- &ev);
+ start_param.tick_type = ODP_TIMER_TICK_ABS;
+ start_param.tick = tick_cur + tick_ns;
+ start_param.tmo_ev = ev;
+ status = odp_timer_start(timer, &start_param);
if (status != ODP_TIMER_SUCCESS) {
ODPH_ERR("Timer set %i/%i (ret %i)\n", i, j, status);
return -1;
@@ -656,6 +659,7 @@ static int set_cancel_mode_worker(void *arg)
odp_timer_t timer;
odp_timer_pool_t tp;
odp_timeout_t tmo;
+ odp_timer_start_t start_param;
thread_arg_t *thread_arg = arg;
test_global_t *global = thread_arg->global;
test_options_t *test_options = &global->test_options;
@@ -746,7 +750,11 @@ static int set_cancel_mode_worker(void *arg)
if (status < 0)
continue;
- status = odp_timer_set_abs(timer, tick + j * period_tick, &ev);
+ start_param.tick_type = ODP_TIMER_TICK_ABS;
+ start_param.tick = tick + j * period_tick;
+ start_param.tmo_ev = ev;
+
+ status = odp_timer_start(timer, &start_param);
num_set++;
if (status != ODP_TIMER_SUCCESS) {