handle log_unix_epoch=1
[fio.git] / crc / test.c
index 368229e736bec8d9ef38c745c66bdd534363f66b..b57f07a4d718f3b623920528d74cde69740f7820 100644 (file)
@@ -1,11 +1,12 @@
+#include <inttypes.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
 
-#include "../fio.h"
 #include "../gettime.h"
 #include "../fio_time.h"
-#include "../verify.h"
+#include "../lib/rand.h"
+#include "../os/os.h"
 
 #include "../crc/md5.h"
 #include "../crc/crc64.h"
@@ -392,7 +393,7 @@ int fio_crctest(const char *type)
        fill_random_buf(&state, buf, CHUNK);
 
        for (i = 0; t[i].name; i++) {
-               struct timeval tv;
+               struct timespec ts;
                double mb_sec;
                uint64_t usec;
                char pre[3];
@@ -409,9 +410,9 @@ int fio_crctest(const char *type)
                        t[i].fn(&t[i], buf, CHUNK);
                }
 
-               fio_gettime(&tv, NULL);
+               fio_gettime(&ts, NULL);
                t[i].fn(&t[i], buf, CHUNK);
-               usec = utime_since_now(&tv);
+               usec = utime_since_now(&ts);
 
                if (usec) {
                        mb_sec = (double) mb / (double) usec;