X-Git-Url: https://git.kernel.dk/?a=blobdiff_plain;f=crc%2Ftest.c;h=b57f07a4d718f3b623920528d74cde69740f7820;hb=2401022342f650ac7d845a14c7b9bf1cd87cead6;hp=368229e736bec8d9ef38c745c66bdd534363f66b;hpb=82e3f7c44e4090c58ca8d463550e84d011996911;p=fio.git diff --git a/crc/test.c b/crc/test.c index 368229e7..b57f07a4 100644 --- a/crc/test.c +++ b/crc/test.c @@ -1,11 +1,12 @@ +#include #include #include #include -#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;