Sender: crough45 AT amc DOT de Message-Id: <97Jul8.160123gmt+0100.16644@internet01.amc.de> Date: Tue, 8 Jul 1997 15:05:30 +0100 From: Chris Croughton Mime-Version: 1.0 To: orly AT gibson DOT eee DOT upd DOT edu DOT ph Cc: djgpp AT delorie DOT com Subject: Re: exact timing and allegro timers Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Precedence: bulk Orlando Andico wrote: > Well, under Linux time is only to 1/100th of a second. Besides, the jiffy > count is updated in the kernel, and everything else uses that -- you don't > need to install your own interrupt handler for timing purposes, you just > read the number of jiffies. Unlike in DOS, I guess. Which suggests the way I'd do it in DOS - install a TSR (using realmode - one reason I'd keep a realmode assembler around) to provide the function. Of course, you then have the problem that you have to distribute that TSR and make sure it's installed... Trying to get an accurate time when it isn't done in the O/S is always dodgy, especially under DOS where almost anything can decide to inhibit interrupts for quite a long time. Some of the MSDOS software - SMARTDRV in particular - used to be very bad at that. Disk and other hardware drivers are common culprits, and if you have the joystick driver then forget timing altogether, because that has to do tight loops to get the position. If you really need accurate timing, nothing will substitute for dedicated hardware. Unless you write your own O/S (or don't need an O/S like a lot of embedded systems)... Chris C