Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!ccu.umanitoba.ca!herald.usask.ca!alberta!ubc-cs!uw-beaver!milton!ogicse!emory!wuarchive!waikato.ac.nz!comp.vuw.ac.nz!tlitton From: Timothy.Litton@comp.vuw.ac.nz (Tim Litton) Newsgroups: comp.os.msdos.programmer Subject: Re: Accurate timing request Message-ID: <1991Mar14.040625.13212@comp.vuw.ac.nz> Date: 14 Mar 91 04:06:25 GMT References: <1991Mar6.145414.8747@uwovax.uwo.ca> <1991Mar7.025205.9213@qualcomm.com> Sender: tlitton@comp.vuw.ac.nz (Timothy Bruce Litton) Organization: Computer Science, Victoria University, Wellington, NewZealand Lines: 38 Nntp-Posting-Host: barretts.comp.vuw.ac.nz Originator: tlitton@barretts.comp.vuw.ac.nz In article <1991Mar7.025205.9213@qualcomm.com>, rdippold@maui.qualcomm.com (Ron Dippold) writes: |> In article <1991Mar6.145414.8747@uwovax.uwo.ca> |> bangarth@uwovax.uwo.ca writes: |> >Researchers here are looking for some facility to measure time with |> 1 ms. |> >or less accuracy on an AT or 386 machine. We currently with our |> software |> >(in Turbo Pascal) can't get any better than about 3 ms. accuracy. I |> have heard |> |> I would suggest that you speed up the clock ticks. Currently they |> occur |> 18.2 times a second, but you can speed it up so that they occur 1000 |> times |> a second or more, as the timer is programmable. Your interrupt |> routine will |> need to scale whatever timer value you use down to the expected value |> and |> pass that on to the old timer. For example, if you speed up the |> timer 128 |> times, you will need to call the old interrupt vector every 128 |> actual ticks. |> You can get some great accuracy this way, just keep in mind that the |> faster |> you interrupt the processor, the more machine power it gobbles up. Don't try this!!! Your system clock is dependent on that timer, so are most of your I/O devices for time outs! Personally, I would put up the +/- 5ms inaccuracy then try this! Tim Litton.