Subject: Re: microtime
To: None <g.mcgarry@ieee.org>
From: Gary Thorpe <gat7634@hotmail.com>
List: tech-kern
Date: 08/02/2002 13:38:38
>From: Gregory McGarry <g.mcgarry@ieee.org>
>To: Simon Burge <simonb@wasabisystems.com>
>CC: tech-kern@netbsd.org
>Subject: Re: microtime
>Date: Fri, 2 Aug 2002 17:45:25 +1200
>
>Simon Burge wrote:
>
> > On Thu, Aug 01, 2002 at 10:10:43PM -0700, Jason R Thorpe wrote:
> >
> > > On Fri, Aug 02, 2002 at 05:08:38PM +1200, Gregory McGarry wrote:
> > >
> > > > In terms of hardware handshake, then perhaps it isn't. In the
>context
> > > > of delay() and DELAY() doing the same thing, then it doesn't make
> > > > sense to me to have both. Is that what you meant?
> > >
> > > You're right, it doesn't make sense to have both, but I'm not
>convinced
> > > that DELAY() is the right one :-)
> >
> > The way I recall it is that DELAY() is for constant (maybe small?)
> > times, and delay() is the "general-purpose" delay function.
>
>That sounds plausible. Except it isn't consistently implemented
>that way round. Most, if not all, ports don't make a distinction
>between the two functions. Particularly after compiler optimisations
>have inlined the code.
>
>I was also planning to add code to check the accuracy of DELAY().
>I suspect that some ports, such as the mips-based ones, have delays
>which are way out.
>
> -- Gregory McGarry <g.mcgarry@ieee.org>
I have another time-related question: for very short times one should use
DELAY() (or delay()), but when is it "long enough" to use something like
tsleep()? When is the overhead enough to justify sleeping instead of polling
using delays?
_________________________________________________________________
MSN Photos is the easiest way to share and print your photos:
http://photos.msn.com/support/worldwide.aspx