usec += 1000000;
}
+ if (sec < 0 || (sec == 0 && usec < 0))
+ return 0;
+
sec *= 1000UL;
usec /= 1000UL;
ret = sec + usec;
- /*
- * time warp bug on some kernels?
- */
- if (ret < 0)
- ret = 0;
-
return ret;
}
return 0;
}
-static void fio_init time_init(void)
+void fio_time_init(void)
{
int i;
+ fio_clock_init();
+
/*
* Check the granularity of the nanosleep function
*/