X-Git-Url: https://git.distorted.org.uk/~mdw/catacomb/blobdiff_plain/71080a1b7e1bb95a65007aa2263562e43a477d32..ff98dc94cb5d9498cd92edd6b734ec863d763852:/noise.c diff --git a/noise.c b/noise.c index 90889306..c122506f 100644 --- a/noise.c +++ b/noise.c @@ -390,7 +390,8 @@ int noise_freewheel(rand_pool *r) done: signal(SIGALRM, sigal); - TV_SUB(&oitv.it_value, &oitv.it_value, &itv.it_value); + if (oitv.it_value.tv_sec || oitv.it_value.tv_usec) + TV_SUB(&oitv.it_value, &oitv.it_value, &itv.it_value); setitimer(ITIMER_REAL, &oitv, 0); return (rc); }