Jeff Davis <pgsql@j-davis.com> writes:
> I briefly skimmed the thread and didn't find the reason why the API
> requires an absolute time.
Because a common call pattern is to loop around PQsocketPoll calls.
In that scenario you generally want to nail down the timeout time
before starting the loop, not have it silently move forward after
any random event that breaks the current wait (EINTR for example).
pqSocketCheck and pqConnectDBComplete both rely on this.
regards, tom lane