Dan Porat said:
W32Time affects the computer's clock.
How does the change in machine clock and clock Frequency affect the clock
ticks?
Thanks a lot
W32time is the Windows service which keeps the
time-of-day clocks synchronised. ( Not the CPU clock. )
Please see the following article for a good discussion onW32Time:
The Windows Time Service
http://www.microsoft.com/windows2000/docs/wintimeserv.doc
Depending on the amount of time skew, it does say that it adjusts the clock
frequency.
But it's adjusting the time-of-day clock, not the CPU clock.
I don't know what it actually does, but these are my thoughts...
I'm not 100% sure what hardware the time-of-day clock is based on these
days, but in ye olde days, the CMOS clock was used at boot-up time to
initialise the OS clock. The OS then kept it's own track of elapsed time
based on counting interrupts ( IRQ 0, if I recall correctly ), that occours
every 55mS ( or 18.2 times/second. ).
CPU clock frequency is not a factor in this, the 55mS timer interupt is
coming from a
8253/8254 PIT - Programmable Interval Timer.
So if the windows internal clock is still based on the Time-of-Day 55mS
'clock tick' interrupts, then to adjust the clock speed, the OS needs to
either:
- re-program the dividers on the 8253/8254 PIT -
Programmable Interval Timer's counter 0 ( time-of-day clock ),
to hardware alter the frequency of interrupts, or....
- make adjustments in the interrupt handler software to scale the
elapsed time each interrupt represents.