Joachim Wieland <joe(at)mcknight(dot)de> writes:
> I append a new version with the regression test ripped out.
Applied with revisions. I concluded that the idea of computing the
end-time in advance had merit, so I changed the code to do it that way.
Aside from not allowing extra delay to accumulate in a multiple-second
wait, this guarantees that we cannot wait *less* than the requested
time, which is a hazard if the system has interruptible select().
Other minor comments: if you declare the function strict it is not
necessary to check for null inputs, and you were doing the float-to-int
conversion the hard way.
regards, tom lane