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.bro...@linaro.org>
---
 example/timer/odp_timer_simple.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/example/timer/odp_timer_simple.c b/example/timer/odp_timer_simple.c
index 98c08ce..70804bb 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 */
-- 
2.9.0

Reply via email to