diff options
Diffstat (limited to 'example/timer/odp_timer_simple.c')
-rw-r--r-- | example/timer/odp_timer_simple.c | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/example/timer/odp_timer_simple.c b/example/timer/odp_timer_simple.c index 681f95714..ceba66c62 100644 --- a/example/timer/odp_timer_simple.c +++ b/example/timer/odp_timer_simple.c @@ -1,13 +1,13 @@ -/* Copyright (c) 2016-2018, Linaro Limited - * All rights reserved. - * - * SPDX-License-Identifier: BSD-3-Clause +/* SPDX-License-Identifier: BSD-3-Clause + * Copyright (c) 2016-2018 Linaro Limited */ + /** - * @file + * @example odp_timer_simple.c + * + * Minimal example application demonstrating ODP timer API usage * - * @example odp_timer_simple.c ODP simple example to schedule timer - * action for 1 second. + * @cond _ODP_HIDE_FROM_DOXYGEN_ */ #include <string.h> @@ -121,9 +121,8 @@ int main(int argc ODP_UNUSED, char *argv[] ODP_UNUSED) ev = odp_timeout_to_event(tmo); - /* Calculate period for timer in uint64_t value, in current case - * we will schedule timer for 1 second */ - period = odp_timer_ns_to_tick(timer_pool, 1 * ODP_TIME_SEC_IN_NS); + /* Calculate timer period in ticks */ + period = odp_timer_ns_to_tick(timer_pool, 100 * ODP_TIME_MSEC_IN_NS); /* Wait time to return from odp_schedule() if there are no * events @@ -159,7 +158,7 @@ int main(int argc ODP_UNUSED, char *argv[] ODP_UNUSED) i, odp_time_to_ns(time)); /* Do not free current event, just go back to loop and program - * timeout to next second. + * the next timeout. */ } |