Ephraim F. Moya wrote:

On Sat, 01 Oct 2005 23:09:47 +0100, [EMAIL PROTECTED] (David
Woolley) wrote:

In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Danny Mayer) wrote:

ntpd on Windows does set the CMOS clock, at least it's supposed to.
Not in version 4.2.0 and I would consider it a bug for it to set
in a later version as it would be redundant, would risk a conflict [A]
with the kernel code that already does this, and might fail to
implement the policy that only the low order part of the hardware
clock is adjusted, to allow people to dual boot Windows, which
requires the hardware clock to be in wall clock time.

This code in the linux kernel (2.4.26) already ensures that the CMOS clock
tracks a synchronised software clock (arch/i386/kernel/time.c):

      /*
       * If we have an externally synchronized Linux clock, then update
       * CMOS clock accordingly every ~11 minutes. Set_rtc_mmss() has to be
       * called as close as possible to 500 ms before the new second starts.
       */
      if ((time_status & STA_UNSYNC) == 0 &&
          xtime.tv_sec > last_rtc_update + 660 &&
          xtime.tv_usec >= 500000 - ((unsigned) tick) / 2 &&
          xtime.tv_usec <= 500000 + ((unsigned) tick) / 2) {
              if (set_rtc_mmss(xtime.tv_sec) == 0)
                      last_rtc_update = xtime.tv_sec;
              else
                      last_rtc_update = xtime.tv_sec - 600; /* do it again in
60 s */
      }


[A] not all versions of linux support /dev/rtc, which would be necessary, but
possibly not sufficient, for user space code to update the clock atomically.

You seem to be describing linux only. ?? Is the same true for WinXP?
If not, what is true for WinXP?

ntp seemed a good solution since I thought I could forget about
calibrating it once I install it.

It seems that ntp may not be what I want. Can somebody recommend a
program for WinXP that will consult a time server once an hour (or so)
and set my hardware clock. I'd like it to be as independant as
possible since I envision it running in the background with no
attention from me.

FWIW the hardware clock on my computer drifts about 1.5 seconds per
day. I can set it by hand but I'm not fast enough to get within a
second and I don't want to mess with it normally.
I think you may be confused about the clocks on Windows. Yes, there are two. Windows maintains a software clock; it's what displays the time at the right hand side of the tool bar. There is a also a hardware clock (CMOS) that is used only to set the software clock when the machine is rebooted. Neither one wins any prizes for accuracy. The CMOS clock is updated with the current time from the software clock when the system is shut down. NTP disciplines the software clock.

Instead ntpd, you might use the sntp client available in the reference implementation or you might use W32time, Microsoft's non-standards-compliant version of sntp. Any of these three options should keep the software clock within fifty milliseconds or better. Ntpd should do the best job but it may be overkill with respect to your needs. I use W32time on all my Windows 2000 and XP systems; it's the easiest way. Bring up the command prompt and type:
net time /setsntp:ntpserver
net time start
and you're done. Replace "ntpserver" with the IP address of the system you wish to use as a server. W32time queries the server several times a day and tweaks the software clock to bring it into line.

Google for "The Windows Time Service" by Shala Brandolini and Darin Green. It's a Word document that describes the service in some detail.

_______________________________________________
questions mailing list
[email protected]
https://lists.ntp.isc.org/mailman/listinfo/questions

Reply via email to