Mail Archives: djgpp/1998/05/06/16:31:40
From: | "M.D. Vrabel" <mdv21 AT hermes DOT cam DOT ac DOT uk>
|
Newsgroups: | comp.os.msdos.djgpp
|
Subject: | Re: Make "Clock SKew" problem.
|
Date: | Wed, 6 May 1998 20:54:01 +0100
|
Organization: | University of Cambridge, England
|
Lines: | 62
|
Message-ID: | <Pine.PCW.3.95.980506203053.2455A-100000@pc001.nmus.pwf.cam.ac.uk>
|
Reply-To: | "M.D. Vrabel" <mdv21 AT hermes DOT cam DOT ac DOT uk>
|
NNTP-Posting-Host: | pc001.nmus.pwf.cam.ac.uk
|
Mime-Version: | 1.0
|
To: | djgpp AT delorie DOT com
|
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp
|
On Tue, 05 May 1998 15:43:35 Anton Helm wrote:
> 2) The second case was rather esoteric. I haven't managed to reproduce
> it
> yet but I have 3 witnesses whom I showed the following phenomenon:
> The system clock of WinNT4.0 and the time used in a DOS-box had a
> difference
> of 27 minutes, which resulted in the same error message. Rebooting the
> PC
> removed the 27 minutes "skew".
The follwing was taken from;
http://www.geocities.com/SiliconValley/2151/cmos.html
(And is copyright 1997 by Mark Feldman)
>>>>>>>>>>>>>>>>>>>>>>>
The CMOS timer is a chip on the motherboard responsible for keeping track
of the time. It's connected to the motherboard
battery, which is why your computer keeps the correct time even when you
unplug it from the wall (unless of course you
disconnect the battery). When the computer is first booted the appropriate
BIOS function reads the time from the CMOS chip
and sets the appropriate variables in system memory. BIOS also initializes
the PIT chip, which then periodically (ie 18.2 times a
second) generates an interrupt to update the time variables. Messing with
the PIT chip's frequency will affect the computer's
time, but it will automatically be set again the next time the user boots
and BIOS reads the CMOS chip again. You can also
read the time from the CMOS chip directly if you want to set the correct
time afterwards (details on how to do this are in
HelpPC).
One very useful feature of the CMOS timer is that it's capable of
generating regular interrupts. The frequency is fixed at
1024Hz, but that's is more than enough for most applications, and in my
experiments it has a negligable affect on overall system
performance. Best of all, it leaves the PIT chip free to do other stuff.
In fact, if you develop your application carefully you
probably won't have to use the PIT chip at all (unless you need an
extremely high resolution timer such as that required for
CPU instruction timing)! I've found the CMOS timer to be safer, easier to
implement and more reliable that PIT (particularly
when running under a Win95 DOS shell).
>>>>>>>>>>>>>>>>>>
This would seem to explain way the problem was solved when you rebooted.
Could there be another program running which might be messing around with
the timer like this?
I can't help you any more I'm afraid since all I know I have just
copied from that web page.
Mark Vrabel.
- Raw text -