static struct timeval genesis;
static unsigned long ns_granularity;
-unsigned long long genesis_cycles;
unsigned long long utime_since(struct timeval *s, struct timeval *e)
{
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;
}
-void fio_init fio_time_init(void)
+void fio_time_init(void)
{
int i;
void set_genesis_time(void)
{
fio_gettime(&genesis, NULL);
- genesis_cycles = get_cpu_clock();
}
void fill_start_time(struct timeval *t)