From: Nigel Stephens Date: Fri, 30 Sep 94 18:09:13 +0100 To: Long Doan Cc: "Victor K. Chu" , DJGPP AT sun DOT soe DOT clarkson DOT edu Subject: Re: accuracy of clock() References: <199409300439 DOT VAA18364 AT euler DOT Berkeley DOT EDU> Long Doan (ldoan1 AT mason1 DOT gmu DOT edu) writes: > > I wonder if anyone knows that there is any way to get a more > > accurate time? > > There is one way to do it through reprogramming the timer chip. This > also requires modification (replacement) of the DOS Interrupt 8 so that > the DOS clock is properly updated. This method is presented clearly in > Intel manuals. If you do not actually need more frequent interrupts, but just want to accurately read the elapsed time, then another way to do it might be to leave the timer interrupting at 18.2Hz, but read the timer's count register. By doing this you can calculate how many microsecs have passed since the last interrupt, and add that to the interrupt count. Regards _________________________________________________________________________ Nigel Stephens, Algorithmics Ltd, 3 Drayton Park, London, N5 1NU, England phone: +44 71 700 3301 fax: +44 71 700 3400 email: nigel AT algor DOT co DOT uk