Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!elroy.jpl.nasa.gov!sdd.hp.com!wuarchive!m.cs.uiuc.edu!ux1.cso.uiuc.edu!usenet From: tmkk@uiuc.edu (K. Khan) Newsgroups: comp.sys.ibm.pc.hardware Subject: Re: Accurate timing on AT-computer Message-ID: <1991May23.215001.13280@ux1.cso.uiuc.edu> Date: 23 May 91 21:50:01 GMT References: <1991May23.152030.7710@ugle.unit.no> Sender: usenet@ux1.cso.uiuc.edu (News) Organization: University of Illinois at Urbana Lines: 19 In article <1991May23.152030.7710@ugle.unit.no> gunnarkn@itk.unit.no (Gunnar Knutson) writes: > >-- > I need to time the interval between two interrupts with >accuracy in the milli-seconds range. The maximum resolution on the AT >real time clock is one second, so I can't use that. Does anyone out >there have a better idea ? Here's one: get a better set of documentation on the AT's real time clock - the docs which told you its maximum resolution was only 1 second are quite thoroughly wrong. Byte magazine published code for a timer routine which would accurately measure events of less than 1 millisecond (e.g. something like 53 uS, if I recall correctly). Whatever the exact number, such event timing CAN be done with the AT's 8253 programmable timer chip. A good reference is Robert Jourdain's "Programmer's Problem Solver" book (note: he now has a new one out, co-authored by Peter Norton, which may replace the earlier book).