On Thu, 25 Jul 2019 09:47:53 -0500, Scott Cheloha wrote:

> I've been thinking for a while about adding another macro to sys/time.h
> to handle this very common case, "timerisexpired":
>
> #define timerisexpired(tv) ((tv)->tv_sec < 0 || !timerisset((tv)))
>
> for chipping away at relative timeouts.  Then we could write
>
>       if (!timerisexpired(&itp->it_value))
>
> ... which is precisely what we want to express.

That would make it easier to read for sure.

 - todd

Reply via email to