Nathan Bossart <nathandbossart@gmail.com> writes:
> Agreed, I'm not too worried about the system calls in this case. I think I
> was more interested in seeing whether we could avoid the complicated float
> handling. Something else that seems to work is moving the initial endtime
> calculation to within the loop, like so:
> - delay = endtime - GetNowFloat();
> + if (first)
> + {
> + endtime = GetNowFloat() + secs;
> + delay = secs;
> + first = false;
> + }
> + else
> + delay = endtime - GetNowFloat();
Hmm ... I'm not sure I'd trust that to give the right answer
if WaitLatch is interrupted so that we have to recalculate
the delay.
> But, in any case, your patch still LGTM.
Pushed it. Again, thanks for reviewing!
regards, tom lane