X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=idletime.c;h=bc8097680d69f37b139495b61f56287b588c9693;hp=c0bc0bfce19675e311fcbd7394540b02a7010eba;hb=9da67e75febb49f29b1657e93e592b656ec84f11;hpb=476882d7947f650783b255a8da74954069af90de diff --git a/idletime.c b/idletime.c index c0bc0bfc..bc809768 100644 --- a/idletime.c +++ b/idletime.c @@ -336,7 +336,10 @@ void fio_idle_prof_stop(void) /* calculate idleness */ if (ipc.cali_mean != 0.0) { runt = utime_since(&ipt->tps, &ipt->tpe); - ipt->idleness = ipt->loops * ipc.cali_mean / runt; + if (runt) + ipt->idleness = ipt->loops * ipc.cali_mean / runt; + else + ipt->idleness = 0.0; } else ipt->idleness = 0.0; }