Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!pt.cs.cmu.edu!b.gp.cs.cmu.edu!Ralf.Brown@B.GP.CS.CMU.EDU From: Ralf.Brown@B.GP.CS.CMU.EDU Newsgroups: comp.os.msdos.programmer Subject: Re: How can I get a timed delay of 1 millisecond ? Message-ID: <26ee2f32@ralf> Date: 12 Sep 90 12:50:58 GMT Sender: ralf@b.gp.cs.cmu.edu Organization: Carnegie Mellon University School of Computer Science Lines: 17 In-Reply-To: <4064@rtifs1.UUCP> In article <4064@rtifs1.UUCP>, bcw@rti.rti.org (Bruce Wright) wrote: }In article <6250@castle.ed.ac.uk>, elee24@castle.ed.ac.uk (H Bruce) writes: }> What is the best way to get a program to wait for one milliosecond ? }> (I am using Microsoft C V5.1). } }The usual way to get a timed delay of one millisecond on the }PC is to time a loop that't long enough to take a significant }amount of time even on a 486, and then scale that appropriately }to execute the loop the proper number of times for your PC. This On ATs and up, you can program the real-time clock chip to generate interrupts 1024 times per second, which will get you close to 1ms delays. -- UUCP: {ucbvax,harvard}!cs.cmu.edu!ralf -=- 412-268-3053 (school) -=- FAX: ask ARPA: ralf@cs.cmu.edu BIT: ralf%cs.cmu.edu@CMUCCVMA FIDO: 1:129/3.1 Disclaimer? | I was gratified to be able to answer promptly, and I did. What's that? | I said I didn't know. --Mark Twain