diff options
author | Matias Elo <matias.elo@nokia.com> | 2023-10-11 12:44:28 +0300 |
---|---|---|
committer | Matias Elo <matias.elo@nokia.com> | 2023-10-23 10:59:18 +0300 |
commit | 303fb45b65e2ae9615a921935decdeeb728f9e97 (patch) | |
tree | 6b4a9d56dc90cae7b6e8b3adc829d612c4ecc5f2 | |
parent | 4ed9c08af315a18fa61ac9781d3a5bf595a0cfcb (diff) |
example: timer_accuracy: use new ODPH_ABS macro
Utilize new ODPH_ABS() macro in timer accuracy example application.
Signed-off-by: Matias Elo <matias.elo@nokia.com>
Reviewed-by: Tuomas Taipale <tuomas.taipale@nokia.com>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
-rw-r--r-- | example/timer/odp_timer_accuracy.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/example/timer/odp_timer_accuracy.c b/example/timer/odp_timer_accuracy.c index ff6794166..9a4593a9a 100644 --- a/example/timer/odp_timer_accuracy.c +++ b/example/timer/odp_timer_accuracy.c @@ -21,8 +21,6 @@ #define MAX_QUEUES 1024 #define MAX_FILENAME 128 -#define ABS(v) ((v) < 0 ? -(v) : (v)) - enum mode_e { MODE_ONESHOT = 0, MODE_RESTART_ABS, @@ -973,7 +971,7 @@ static void print_stat(test_global_t *test_global) timer_ctx_t *t = &test_global->timer_ctx[i]; int64_t v = t->first_tmo_diff; - if (ABS(v) > ABS(max)) { + if (ODPH_ABS(v) > ODPH_ABS(max)) { max = v; idx = i; } @@ -990,7 +988,7 @@ static void print_stat(test_global_t *test_global) timer_ctx_t *t = &test_global->timer_ctx[i]; int64_t v = t->nsec_final; - if (ABS(v) > ABS(max)) + if (ODPH_ABS(v) > ODPH_ABS(max)) max = v; } |