diff options
author | Brian Brooks <brian.brooks@linaro.org> | 2016-07-18 13:16:45 -0400 |
---|---|---|
committer | Maxim Uvarov <maxim.uvarov@linaro.org> | 2016-10-21 16:07:52 +0300 |
commit | 25f82fc54a78100098eae5b22719571b6991c955 (patch) | |
tree | a9a99f22e481b7dc2c6d2cd5232bcb64ea1c0fd5 /example | |
parent | ce4fec46c1f6821afb5d0ef9c3099cd094153fd9 (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.c | 4 |
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 */ |