summaryrefslogtreecommitdiff
path: root/time.c
diff options
context:
space:
mode:
Diffstat (limited to 'time.c')
-rw-r--r--time.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/time.c b/time.c
index 6397f20e..5755b67e 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 @@ int ramp_time_over(struct thread_data *td)
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 @@ static void fio_init time_init(void)
void set_genesis_time(void)
{
fio_gettime(&genesis, NULL);
+ genesis_cycles = get_cpu_clock();
}
void fill_start_time(struct timeval *t)