Article View: alt.comp.hardware
Article #3847Re: pc clock
From: Barry Watzman
Date: Wed, 12 Jun 2002 01:34
Date: Wed, 12 Jun 2002 01:34
61 lines
4156 bytes
4156 bytes
Masking interrupts -- even forever -- won't slow the clock down in
exactly the way that you suggest. The clock chip keeps time completely
independently of the computer (imagine that it was an RS-232 serial
external clock -- the only thing that the computer does is read it, and
occasionally set it, but the clock runs completely independently of the
computer). Although it's not an external serial clock, that's
effectively how it works.
The way that the computer keeps time is that there are two clocks -- the
actual "clock" ("hardware clock", if you prefer) and a "software clock"
maintained by the computer (BIOS and/or operating system) only while
it's running. The software clock is what you see, what is used for
date/time stamping, what appears in the system tray. It's updated by a
hardware generated interrupt that "ticks" 20 times per second
(approximately). If you disable interrupts, you WILL lose time on the
software clock and it will not "catch up" on it's own when interrupts
are re-enabled. HOWEVER, the software clock is reset every time that
you reboot the computer, so while it would temporarily lose time, it
would be reset the next time that you started the computer.
If you are losing time over a period of days, assuming that you do
reboot the computer from time to time, then it's the hardware clock --
the real, hardware, battery powered, crystal controlled clock -- that's
losing time, and this has nothing to do with interrupts being on or off.
Turning off interrupts will cause a loss of time, but only until the
next reset of the computer. Interrupts will not cause a permanent loss
of time.
Andy Champ wrote:
> ben wrote:
>
>> My pc clock seems to be slowing down by about 6 hours a day! Has it got
>> anything to do with the pc battery. I thought a weak pc battery (
>> usually
>> the coin type) will only show the CMOS message that tells one to
>> reset the
>> CMOS. I have replaced a pc battery before.........in this case. Is
>> there
>> another separate clock battery?.......if so how do I replace it?
>>
>> Anyone can point me in the right direction?
>>
>> Thanks
>>
>>
> Two things I know of can do this kind of thing:
>
> (1) low CMOS battery. When the main power is off there's enough juice
> to keep the RAM, but not to run the clck oscillator - hence it stops
> whenever power is off.
> (2) something in the system that masks interrupts for very long times.
>
> 6 hours seems a bit short for (1) and much too long for (2) so it must
> be something else! However, try replacing the CMOS battery.
>
> Andy.
>
>
>
Technical Details
Message-ID:
<3D06A3D6.9080602@neo.rr.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed1.cidera.com!Cidera!cyclone.socal.rr.com!cyclone3.kc.rr.com!news3.kc.rr.com!twister.neo.rr.com.POSTED!not-for-mailReferences:
<ae5bbn$87l$1@news5.jaring.my> <3D0681F0.8050301@read.my.sig>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f5f89,7a1401a6e40bdf58 X-Google-Attributes: gidf5f89,public X-Google-Thread: 1011f8,2e46e310bc4e9bd8 X-Google-Attributes: gid1011f8,public X-Google-Thread: 10483c,2e46e310bc4e9bd8 X-Google-Attributes: gid10483c,public X-Google-Thread: ff9b0,2e46e310bc4e9bd8 X-Google-Attributes: gidff9b0,public X-Google-ArrivalTime: 2002-06-11 18:28:55 PST Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed1.cidera.com!Cidera!cyclone.socal.rr.com!cyclone3.kc.rr.com!news3.kc.rr.com!twister.neo.rr.com.POSTED!not-for-mail Message-ID: <3D06A3D6.9080602@neo.rr.com> From: Barry Watzman <Watzman@neo.rr.com> User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.0rc2) Gecko/20020512 Netscape/7.0b1 X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: alt.comp.hardware,alt.comp.periphs.mainboard.asus,alt.comp.periphs.mainboard.giga-byte,jaring.pcbase Subject: Re: pc clock References: <ae5bbn$87l$1@news5.jaring.my> <3D0681F0.8050301@read.my.sig> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Lines: 62 Date: Wed, 12 Jun 2002 01:34:01 GMT NNTP-Posting-Host: 24.93.216.60 X-Complaints-To: abuse@rr.com X-Trace: twister.neo.rr.com 1023845641 24.93.216.60 (Tue, 11 Jun 2002 21:34:01 EDT) NNTP-Posting-Date: Tue, 11 Jun 2002 21:34:01 EDT Organization: Road Runner High Speed Online -- Northeast Ohio