Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 29 Nov 2005 15:05:27 +1100 (EST)
From:      Bruce Evans <bde@zeta.org.au>
To:        =?iso-8859-1?q?Dag-Erling_Sm=F8rgrav?= <des@des.no>
Cc:        cvs-src@freebsd.org, src-committers@freebsd.org, Robert Watson <rwatson@freebsd.org>, cvs-all@freebsd.org
Subject:   Re: cvs commit: src/sys/sys time.h src/sys/kern kern_time.c
Message-ID:  <20051129145321.E33975@delplex.bde.org>
In-Reply-To: <86d5kkbygy.fsf@xps.des.no>
References:  <200511270055.jAR0tIkF032480@repoman.freebsd.org> <20051127230412.H28222@delplex.bde.org> <20051127125844.V81764@fledge.watson.org> <20051128002937.T17822@epsplex.bde.org> <86d5kkbygy.fsf@xps.des.no>

next in thread | previous in thread | raw e-mail | index | archive | help
  This message is in MIME format.  The first part should be readable text,
  while the remaining parts are likely unreadable without MIME-aware tools.

--0-682181516-1133237127=:33975
Content-Type: TEXT/PLAIN; charset=X-UNKNOWN; format=flowed
Content-Transfer-Encoding: QUOTED-PRINTABLE

On Mon, 28 Nov 2005, [iso-8859-1] Dag-Erling Sm=F8rgrav wrote:

> Bruce Evans <bde@zeta.org.au> 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 an=
d
>> it's relative so it doesn't need the current time, but just to record wh=
en
>> 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
--0-682181516-1133237127=:33975--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20051129145321.E33975>