Add support for specific clock sources
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
diff --git a/time.c b/time.c
index 6397f20..5755b67 100644
--- a/time.c
+++ b/time.c
@@ -5,6 +5,7 @@
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)
{
@@ -150,10 +151,12 @@
return 0;
}
-static void fio_init time_init(void)
+void fio_init fio_time_init(void)
{
int i;
+ fio_clock_init();
+
/*
* Check the granularity of the nanosleep function
*/
@@ -177,6 +180,7 @@
void set_genesis_time(void)
{
fio_gettime(&genesis, NULL);
+ genesis_cycles = get_cpu_clock();
}
void fill_start_time(struct timeval *t)