On 2025-04-04 12:27, Pádraig Brady wrote: > +  /* Clamp underflow to 1ns, as 0 disables the timeout.  */ > +  if (duration == 0 && errno == ERANGE) > +    duration = 1e-9; That isn't exactly right as the 1e-9 double-rounds to 2e-9 when we compute the struct timespec. Also, even with the patch the code mishandles 16777216.000000001 (2**24 + 10**-9) by treating it as if it were just 16777216. These are tiny bugs, I know, but I took up the challenge of doing this things more correctly by installing the attached.