@@ -423,11 +423,11 @@ static void time_test_accuracy(time_cb time_cur, time_from_ns_cb time_from_ns)
{
int i;
odp_time_t t1, t2, wait, diff;
- clock_t c1, c2;
+ time_t c1, c2;
double sec_t, sec_c;
odp_time_t sec = time_from_ns(ODP_TIME_SEC_IN_NS);
- c1 = clock();
+ c1 = time(NULL);
t1 = time_cur();
wait = odp_time_sum(t1, sec);
@@ -436,12 +436,12 @@ static void time_test_accuracy(time_cb time_cur, time_from_ns_cb time_from_ns)
wait = odp_time_sum(wait, sec);
}
+ c2 = time(NULL);
t2 = time_cur();
- c2 = clock();
diff = odp_time_diff(t2, t1);
sec_t = ((double)odp_time_to_ns(diff)) / ODP_TIME_SEC_IN_NS;
- sec_c = ((double)(c2 - c1)) / CLOCKS_PER_SEC;
+ sec_c = ((double)(c2 - c1));
/* Check that ODP time is within +-5% of system time */
CU_ASSERT(sec_t < sec_c * 1.05);