Path: utzoo!dptcdc!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!agate!eos!ptolemy!raymond From: raymond@ptolemy.arc.nasa.gov (Eric A. Raymond) Newsgroups: comp.sys.ibm.pc Subject: Re: wall-time creep under MS-DOS? Keywords: time() speeds up; interrupts Message-ID: <1087@ptolemy.arc.nasa.gov> Date: 17 Apr 89 21:44:42 GMT References: <49479@aerospace.AERO.ORG> Reply-To: raymond@ptolemy.arc.nasa.gov (Eric A. Raymond) Organization: NASA Ames Research Center, Moffett Field, CA Lines: 21 In article <49479@aerospace.AERO.ORG> zeus@zapodid.UUCP (Dave Suess) writes: >I have a realtime application using a PC clone under MS-DOS -- it uses >the 18 Hz interrupt to run a closed-loop servo. The software is in C, >After a few weeks running, the date advances by several days! Is this You've probably replaced the original clock interrupt with your own routine and/or changed the frequency at which the interrupt is called. For the former, call the original interrupt routine sometime during your new interrupt (chain it). For the latter, put some logic in your routine such that the original interrupt routine gets service at its original rate. (i.e. If you changed the timer to be four times faster, count to four and then call the interrupt). -- -- Eric A. Raymond (raymond@ptolemy.arc.nasa.gov) G7 C7 G7 G#7 G7 G+13 C7 GM7 Am7 Bm7 Bd7 Am7 C7 Do13 G7 C7 G7 D+13: Elmore James