Path: utzoo!yunexus!maccs!cs3b3aj From: cs3b3aj@maccs.McMaster.CA (Stephen M. Dunn) Newsgroups: comp.sys.ibm.pc Subject: Re: wall-time creep under MS-DOS? Summary: Clock interrupt frequency Keywords: time() speeds up; interrupts Message-ID: <2467@maccs.McMaster.CA> Date: 21 Apr 89 00:06:41 GMT Article-I.D.: maccs.2467 References: <49479@aerospace.AERO.ORG> Reply-To: cs3b3aj@maccs.UUCP (Stephen M. Dunn) Organization: McMaster U., Hamilton, Ont., Can. Lines: 24 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, >and part of it needs (and displays) local time (using the appropriate >compiler library calls -- Turbo C, in this case). > >After a few weeks running, the date advances by several days! Is this Are you using the number 18 as the clock frequency? If so, that's probably your problem ... it's not actually 18 Hz, it's more like 18.2 (as near as I can figure it, it's 18.215 Hz; maybe one of the IBM Tech Refs is more precise). This might be your problem ... other possible causes include the possibility that the crystal running your machine's clock isn't the precise frequency you expect it to be; however, you'd think it would be more accurate than advancing several days every few weeks. Hope this helps. -- ====================================================================== ! Stephen M. Dunn, cs3b3aj@maccs.McMaster.CA ! DISCLAIMER: ! ! This space left unintentionally blank - vi ! I'm only an undergrad ! ======================================================================