Mail Archives: djgpp/1998/05/08/05:30:27
On Fri, 8 May 1998, Michael Mauch wrote:
> PCs/DOS have many clocks: one of them is the real time clock (RTC),
> another one is the BIOS/DOS clock which is initialized at boot time and
> then incremented every once in a while by the interrupt 9 handler.
^^^^^^^^^^^
That's interrupt 8 (9 is for the keyboard).
> If
> you let your computer run for days, this DOS clock will run all on its
> own and never get re-synchronized; and it's not really accurate.
While this is true, I doubt that a reasonable system would get several
days of time skew if left alone. FWIW, it never happened to me on any
machine I ever used. The crystal which generates the system clock
tick is usually quite accurate, unless something's wrong with the
motherboard.
> Try using uclock() instead, if DJGPP 1.x has this or if you can upgrade
> to v2.01.
v1.x didn't have `uclock' in its library. But even if it did, it
won't help, since `uclock' reads the same timer chip which generates
Interrupt 8. If those interrupts are inaccurate, so will be
`uclock'.
- Raw text -