@@ -26,10 +26,9 @@
#define MAX_WORKERS 32 /**< Max worker threads */
#define MSG_POOL_SIZE (4*1024*1024) /**< Message pool size */
-/* Nanoseconds */
-#define USEC 1000UL
-#define MSEC 1000000UL
-#define SEC 1000000000UL
+#define USEC ODP_TIME_USEC /**< Microsecond */
+#define SEC ODP_TIME_SEC /**< Second */
+
/** Test arguments */
typedef struct {
@@ -195,7 +194,7 @@ static void parse_args(int argc, char *argv[], test_args_t *args)
args->core_count = 0; /* all cores */
args->resolution_us = 10000;
args->min_us = args->resolution_us;
- args->max_us = 100000000;
+ args->max_us = 10000000;
args->period_us = 1000000;
args->tmo_count = 30;
@@ -347,6 +346,12 @@ int main(int argc, char *argv[])
args.min_us*USEC,
args.max_us*USEC);
+ if (test_timer == ODP_TIMER_INVALID) {
+ ODP_ERR("Timer create failed.\n");
+ return -1;
+ }
+
+
odp_shm_print_all();
printf("CPU freq %"PRIu64" hz\n", odp_sys_cpu_hz());
Signed-off-by: Petri Savolainen <petri.savolainen@linaro.org> --- example/timer/odp_timer_test.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-)