aboutsummaryrefslogtreecommitdiff
path: root/example
diff options
context:
space:
mode:
authorBrian Brooks <brian.brooks@linaro.org>2016-07-18 13:16:45 -0400
committerMaxim Uvarov <maxim.uvarov@linaro.org>2016-10-21 16:07:52 +0300
commit25f82fc54a78100098eae5b22719571b6991c955 (patch)
treea9a99f22e481b7dc2c6d2cd5232bcb64ea1c0fd5 /example
parentce4fec46c1f6821afb5d0ef9c3099cd094153fd9 (diff)
example: odp_timer_simple: decrease timer pool resolution
POSIX timer overruns are experienced on Linux generic platforms when resolution is less than one millisecond. Decrease resolution from 10 microseconds to 10 milliseconds so this example program works as intended on generic Linux platforms. Signed-off-by: Brian Brooks <brian.brooks@linaro.org> Reviewed-by: Kevin Wang <kevin.wang@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
Diffstat (limited to 'example')
-rw-r--r--example/timer/odp_timer_simple.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/example/timer/odp_timer_simple.c b/example/timer/odp_timer_simple.c
index 98c08ce4c..70804bb7b 100644
--- a/example/timer/odp_timer_simple.c
+++ b/example/timer/odp_timer_simple.c
@@ -61,8 +61,8 @@ int main(int argc ODP_UNUSED, char *argv[] ODP_UNUSED)
/*
* Create pool of timeouts
*/
- tparams.res_ns = 10 * ODP_TIME_USEC_IN_NS;
- tparams.min_tmo = 10 * ODP_TIME_USEC_IN_NS;
+ tparams.res_ns = 10 * ODP_TIME_MSEC_IN_NS;
+ tparams.min_tmo = 10 * ODP_TIME_MSEC_IN_NS;
tparams.max_tmo = 1 * ODP_TIME_SEC_IN_NS;
tparams.num_timers = 1; /* One timer per worker */
tparams.priv = 0; /* Shared */