delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/12/30/05:33:10

Date: Wed, 30 Dec 1998 10:58:38 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: Lester Davis <ringo1 AT bellsouth DOT net>
cc: djgpp AT delorie DOT com
Subject: Re: timing in u sec range
In-Reply-To: <36897C5A.F256B909@bellsouth.net>
Message-ID: <Pine.SUN.3.91.981230105813.21377P-100000@is>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com

On Wed, 30 Dec 1998, Lester Davis wrote:

> is it possible to do timing in hundreds of micro seconds. I need to do
> something, wait 300 u secs then do something else.I'm using a 133 mhz
> pentium.

There's `usleep', but it only supports the default PC 54-millisecond
granularity.  To wait 300 usec, you will need to write a loop that
calls `uclock' and tests its value.  `uclock' returns a count that has
a 840 nanosecond granularity.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019