X-Git-Url: https://git.kernel.dk/?a=blobdiff_plain;f=gettime.c;h=7702193dc0b7eced79b5ade5b9a9d07553b9a10e;hb=2048d33fe36bf46f91785e8010f65d875501d410;hp=c0f26382721d0be7e01d413b8a33bcca6ac04921;hpb=bf0b7e75c1ccca4026c8880ed8a76fc7ef85f2f3;p=fio.git diff --git a/gettime.c b/gettime.c index c0f26382..7702193d 100644 --- a/gettime.c +++ b/gettime.c @@ -237,12 +237,11 @@ static unsigned long get_cycles_per_msec(void) c_s = get_cpu_clock(); do { __fio_gettime(&e); + c_e = get_cpu_clock(); elapsed = utime_since(&s, &e); - if (elapsed >= 1280) { - c_e = get_cpu_clock(); + if (elapsed >= 1280) break; - } } while (1); fio_clock_source = old_cs;