Re: advice on how to detect time change



I wrote:
Put an NTP client into your program.

d_cymbal writes:
Perhaps I didn't phrase that question correctly.

You phrased it correctly. You just left of the details. Putting an NTP
client in your program and having it query a reliable time server would
allow it to detect changes in the local system time.

My application doesn't care what the system time is, or care that it is
correct, but it does need to detect if some external entity changes the
time out from under it (this is a master device which must globally
update slave devices with a time change if the user (or some other force
such as ntp) changes the time on the master system.

Then your program need not deal with system time at all. You should
install an NTP package such as Ntp or Chrony on the master and on each
slave and configure the slaves to track the master. This is exactly the
sort of thing that NTP is for.
--
John Hasler
john@xxxxxxxxxx
Dancing Horse Hill
Elmwood, WI USA
.



Relevant Pages

  • Re: advice on how to detect time change
    ... time out from under it (this is a master device which must globally ... update slave devices with a time change if the user (or some other force ... such as ntp) changes the time on the master system. ...
    (comp.os.linux.development.apps)
  • Re: "ntpd -q" is slow compared to ntpdate
    ... on why 'ntpd -q -g' is slow. ... If you run ntp -g, it WILL roughly synchronize it in exactly the same way ... except once it first sets the clock, ... update the clock to roughly the same time as the master, ...
    (comp.protocols.time.ntp)
  • Re: advice on how to detect time change
    ... Putting an NTP ... time out from under it (this is a master device which must globally ... such as ntp) changes the time on the master system. ... slave and configure the slaves to track the master. ...
    (comp.os.linux.development.apps)
  • Re: NTP for dummies
    ... There can be, and should be, an "NTP For Dummies", because us dummies ... MASTER must declare itself to have a stratum above 16. ... My target was closer to yours than to NTP's design function. ... I have possibly one server, a senior client, and 0-11 other clients. ...
    (comp.protocols.time.ntp)
  • Re: advice on how to detect time change
    ... proprietary mechanism. ... The slaves cannot run NTP themselves. ... I need a mechanism for the master device to detect that ...
    (comp.os.linux.development.apps)