X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=gettime.c;h=72fda3f8597e335be2fc4677a208f02db9fa62b7;hp=0ad8d9244f3a18217631dae029137393207e28db;hb=03e20d687566753b90383571e5e152c5142bdffd;hpb=2d7760d1dbbc742a0699b959ffcd8742b9db9e2c;ds=sidebyside diff --git a/gettime.c b/gettime.c index 0ad8d924..72fda3f8 100644 --- a/gettime.c +++ b/gettime.c @@ -5,6 +5,7 @@ #include #include #include +#include #include "fio.h" #include "smalloc.h" @@ -230,7 +231,7 @@ static void calibrate_cpu_clock(void) for (i = 0; i < 10; i++) { double this = cycles[i]; - if ((max(this, mean) - min(this, mean)) > S) + if ((fmax(this, mean) - fmin(this, mean)) > S) continue; samples++; avg += this;