On Mon, 28 Nov 2005, [iso-8859-1] Dag-Erling Sm?rgrav wrote:
Bruce Evans <[EMAIL PROTECTED]> writes:
I can see a use for making a timestamp after select() returns, not for
timeout purposes since the timeout should normally be for emergencies and
it's relative so it doesn't need the current time, but just to record when
things happen.
IIRC, POSIX allows (but does not require) select(2) to modify the
provided struct timeval to reflect how much time remains until the
original deadline. Personally, I would find that very useful...
This would be hard to use because it is unportable. IIRC, Linux did or
does this and found mainly bugs with broken applications expecting the
timeval to be const.
Even with this, applications would still need to know when select() was
called to recover the time when it returned. Adding deltas from select()
to a previous timestamp wouldn't work very well the relative error in
the deltas is large for small deltas (unless you pessimize select() to
get a precise timestamp).
Bruce
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "[EMAIL PROTECTED]"