Juliusz Chroboczek wrote: > Hi, > > How can a userspace application decide whether the current time is > trustworthy? > > For a project of mine, I need to reliably find out whether the system > time is within 5 minutes of UTC. The network will include both > unmanaged client nodes and routers that don't have a battery backed > clock, so incorrect time is rather common. snip > Is that correct? Or is there a better way?
I'd run sntp or ntpdate against a known good source, and note both the measured offset and the total trip time: The maximum offset would be the trip time plus the maximum offset of the server. Anyway, if you're only looking at 5 min precision, simply running ntpd locally is almost overkill: As long as 'ntpq -c rv -p' gives a star for one of the servers, you cannot be more than 128 ms off. Terje -- - <Terje.Mathisen at tmsw.no> "almost all programming can be viewed as an exercise in caching" _______________________________________________ questions mailing list questions@lists.ntp.org https://lists.ntp.org/mailman/listinfo/questions