diff options
author | Petri Savolainen <petri.savolainen@linaro.org> | 2017-04-28 15:09:48 +0300 |
---|---|---|
committer | Maxim Uvarov <maxim.uvarov@linaro.org> | 2017-06-16 16:51:10 +0300 |
commit | 4bb3025e76a81130e8e80cd582ae2433d3450e2b (patch) | |
tree | 6d812f5e9749ad7f8ce9fc5fbbbd9c80d5b25dbe /platform/linux-generic | |
parent | 629be2dd2d166ed1246b8c1982af3a55a7035657 (diff) |
api: time: remove odp_time_to_u64 from API
Debug function that converts odp_time_t to u64 is unnecessary
since odp_time_to_ns() returns time as a u64 (nsec) value.
Application can always use that as the 64 bit representation
of an odp_time_t value. Also validation tests for odp_time_to_u64()
were erroneous since those compared returned u64 values and
expected greater/lesser than relation.
Signed-off-by: Petri Savolainen <petri.savolainen@linaro.org>
Reviewed-and-tested-by: Bill Fischofer <bill.fischofer@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
Diffstat (limited to 'platform/linux-generic')
-rw-r--r-- | platform/linux-generic/odp_time.c | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/platform/linux-generic/odp_time.c b/platform/linux-generic/odp_time.c index 81e05224c..0e5966c07 100644 --- a/platform/linux-generic/odp_time.c +++ b/platform/linux-generic/odp_time.c @@ -176,21 +176,6 @@ void odp_time_wait_until(odp_time_t time) return time_wait_until(time); } -uint64_t odp_time_to_u64(odp_time_t time) -{ - int ret; - struct timespec tres; - uint64_t resolution; - - ret = clock_getres(CLOCK_MONOTONIC_RAW, &tres); - if (odp_unlikely(ret != 0)) - ODP_ABORT("clock_getres failed\n"); - - resolution = (uint64_t)tres.tv_nsec; - - return time_to_ns(time) / resolution; -} - int odp_time_init_global(void) { int ret; |