X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=time.c;h=cd0e2a89144b59a565d88fab6192dda951a8ff2b;hp=1999969955b2828d6a9d38b425147b5ac3b5babf;hb=52a0b9ed71c3e929461e64b39059281948107071;hpb=9a0ac6c7b69355ea095f06c6b0a08115c946dd61 diff --git a/time.c b/time.c index 19999699..cd0e2a89 100644 --- a/time.c +++ b/time.c @@ -57,6 +57,13 @@ uint64_t usec_sleep(struct thread_data *td, unsigned long usec) if (ts >= 1000000) { req.tv_sec = ts / 1000000; ts -= 1000000 * req.tv_sec; + /* + * Limit sleep to ~1 second at most, otherwise we + * don't notice then someone signaled the job to + * exit manually. + */ + if (req.tv_sec > 1) + req.tv_sec = 1; } else req.tv_sec = 0;