delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/08/14/12:42:15

From: "Simon Redwood" <spredwood AT sri-net DOT demon DOT co DOT uk>
Newsgroups: comp.os.msdos.djgpp
Subject: usleep/delay/sleep ?
Date: Sat, 14 Aug 1999 17:21:20 +0100
Organization: SRi Ltd
Message-ID: <934647567.25013.0.nnrp-11.c2de6b60@news.demon.co.uk>
NNTP-Posting-Host: sri-net.demon.co.uk
X-NNTP-Posting-Host: sri-net.demon.co.uk:194.222.107.96
X-Trace: news.demon.co.uk 934647567 nnrp-11:25013 NO-IDENT sri-net.demon.co.uk:194.222.107.96
X-Complaints-To: abuse AT demon DOT net
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2314.1300
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300
Lines: 20
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

I am new to using djgpp under dos, being a unix programmer.  I am having
trouble with delays.

Can I rely on usleep to give me accurate timings.

Giving usleep a value of 10000-12500 produces the same delay, whereas 13000
gives the same as 20000, where I am going wrong.


I would like to put a delay into a loop of about 1/100 sec. how is the best
way to acheive this

I am also looking to work with microprocessors where I will need accurate
timings of nanoseconds, how can this be best acheived.

TIA

Simon


- Raw text -


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