@@ -31,7 +31,7 @@ void time_test_constants(void)
CU_ASSERT(ns == ODP_TIME_USEC_IN_NS);
}
-static void time_test_res(time_res_cb time_res, uint64_t res)
+static int time_test_res(time_res_cb time_res, uint64_t res)
{
uint64_t rate;
@@ -41,16 +41,17 @@ static void time_test_res(time_res_cb time_res, uint64_t res)
res = ODP_TIME_SEC_IN_NS / rate;
res = res ? res : 1;
+ return res;
}
void time_test_local_res(void)
{
- time_test_res(odp_time_local_res, local_res);
+ local_res = time_test_res(odp_time_local_res, local_res);
}
void time_test_global_res(void)
{
- time_test_res(odp_time_global_res, global_res);
+ global_res = time_test_res(odp_time_global_res, global_res);
}
/* check that related conversions come back to the same value */
The resolution vars were not initialized at init, as result the resolution is ideal. This patch corrects it, to use real resolution. Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org> --- test/validation/time/time.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)