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

From Tom Lane
Subject Re: TODO-item: Add sleep() function, remove from regress.c
Date
Msg-id 27752.1137010636@sss.pgh.pa.us
Whole thread Raw
In response to Re: TODO-item: Add sleep() function, remove from regress.c  (Joachim Wieland <joe@mcknight.de>)
List pgsql-patches
Joachim Wieland <joe@mcknight.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

pgsql-patches by date:

Previous
From: Neil Conway
Date:
Subject: mbutils.c memory cxt cleanup
Next
From: Bruce Momjian
Date:
Subject: Re: [HACKERS] Inconsistent syntax in GRANT