Path: utzoo!censor!geac!torsqnt!news-server.csri.toronto.edu!helios.physics.utoronto.ca!ists!yunexus!xrtll!silver From: silver@xrtll.uucp (Hi Ho Silver) Newsgroups: comp.sys.ibm.pc.hardware Subject: Re: DOS and BIOS clocks Message-ID: <1991Jan5.181959.10764@xrtll.uucp> Date: 5 Jan 91 18:19:59 GMT References: Reply-To: silver@xrtll.UUCP (Hi Ho Silver) Organization: Yeah, right. Lines: 29 In article greg@turbo.atl.ga.us writes: $I'm having a problem with my system's clock. Sometimes when I'm running $a program overnight, the date is not updated. I'm using a routine from $BetterBasic that gets the DOS date, so I think the problem is the DOS $clock is not being updated. I need to know when and how the DOS clock is $updated. Shouldn't it be updated everytime I call it?? Or is the BIOS $clock the one not being updated? However, if I reboot the computer, the You have two clocks in your machine. One is a clock that runs whether it's turned on or not; this is the one you've called the "BIOS clock". This is maintained in hardware; it's run by the same battery that keeps your CMOS configuration information. The second one is a software clock maintained by DOS. It's updated approximately 18.2 times a second; that's the clock tick interrupt rate. When you boot your computer, DOS reads the time and date from the hardware clock. Under some versions of DOS, using the TIME command updates the hardware clock. Other than that, the hardware clock is not used. The problem you're experiencing is caused by the fact that most (all?) versions of DOS are too dumb to increment the date when the clock turns over midnight. I guess Microsoft assumed that nobody uses their computers at night and figured they could forget it and nobody would notice. Thanks, guys. I'm not sure if this was fixed in DOS 4. -- __ __ _ | ...!nexus.yorku.edu!xrtll!silver | always (__ | | | | |_ |_) >----------------------------------< searching __) | |_ \/ |__ | \ | if you don't like my posts, type | for _____________________/ find / -print|xargs cat|compress | SNTF