Subject: Re: microtime
To: Gary Thorpe <gat7634@hotmail.com>
From: Gregory McGarry <g.mcgarry@ieee.org>
List: tech-kern
Date: 08/02/2002 09:19:22
Gary Thorpe wrote:
> >From: David Laight <david@l8s.co.uk>
> >CC: tech-kern@netbsd.org
> >Subject: Re: microtime
> >Date: Thu, 1 Aug 2002 11:08:53 +0100
> >
> >On Thu, Aug 01, 2002 at 11:28:23AM +0200, Wojciech Puchar wrote:
> > > what function can i use to measure elapsed time with precision like
> >10us.
> >
> >gettimeofday() used the kernel microtime() function.
> >On i386 that gives a precision of about 1us.
>
> In a device driver, what is the preferred method of inserting a delay
> between operations to implement for example a handshake? I see delay() and
> DELAY(), are there any others and which of these is best to use?
DELAY() and delay() do the same thing. DELAY() is the correct API to use.
I'm planning to nuke delay() from MI code soon, to align with FreeBSD.
-- Gregory McGarry <g.mcgarry@ieee.org>