Re: TODO-item: Add sleep() function, remove from regress.c

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Joachim Wieland <joe(at)mcknight(dot)de>
Cc: pgsql-patches(at)postgresql(dot)org
Subject: Re: TODO-item: Add sleep() function, remove from regress.c
Date: 2006-01-11 20:17:16
Message-ID: 27752.1137010636@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

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

In response to

Browse pgsql-patches by date

  From Date Subject
Next Message Andrus 2006-01-11 20:23:42 Different exponent in error messages
Previous Message Neil Conway 2006-01-11 19:46:02 mbutils.c memory cxt cleanup