X-Git-Url: https://git.kernel.dk/?a=blobdiff_plain;f=t%2Flfsr-test.c;h=a01f2cfcb43c2cf963f69675bd462eb7f0f2fa33;hb=fe6e1197f2ccba76bb3791093c480665bf1796ba;hp=4352b89f3319959ab55c8e90d15e3878717b432e;hpb=92330695e64a42fd5dc54a6970a4b8122d3cd80e;p=fio.git diff --git a/t/lfsr-test.c b/t/lfsr-test.c index 4352b89f..a01f2cfc 100644 --- a/t/lfsr-test.c +++ b/t/lfsr-test.c @@ -1,17 +1,13 @@ #include #include -#include #include #include -#include -#include -#include #include "../lib/lfsr.h" #include "../gettime.h" #include "../fio_time.h" -void usage() +static void usage(void) { printf("Usage: lfsr-test 0x [seed] [spin] [verify]\n"); printf("-------------------------------------------------------------\n"); @@ -27,7 +23,7 @@ void usage() int main(int argc, char *argv[]) { int r; - struct timeval start, end; + struct timespec start, end; struct fio_lfsr *fl; int verify = 0; unsigned int spin = 0; @@ -38,6 +34,8 @@ int main(int argc, char *argv[]) void *v = NULL, *v_start; double total, mean; + arch_init(argv); + /* Read arguments */ switch (argc) { case 5: if (strncmp(argv[4], "verify", 7) == 0) @@ -78,7 +76,7 @@ int main(int argc, char *argv[]) v_size = numbers * sizeof(uint8_t); v = malloc(v_size); memset(v, 0, v_size); - printf("\nVerification table is %lf KBs\n", (double)(v_size) / 1024); + printf("\nVerification table is %lf KiB\n", (double)(v_size) / 1024); } v_start = v;