On 2012-01-10, Chuck Swiger <[email protected]> wrote: > On Jan 10, 2012, at 9:12 AM, Marco Marongiu wrote: >> I understand from "the NTP timescale and leap seconds" by Prof.Mills >> that modern ntpd doesn't step back the clock but either "freezes" time >> during the leap second, or it slightly increments it at each read until >> the "real time" catches up. >> >> Did I get it correctly? > > I think so, yes. > >> If yes, then I would like to know: >> >> - how can I tell if the operating system will freeze/slowdown, or step >> the clock? > > Ask your operating system vendor, or look at the source code: > > http://www.freebsd.org/cgi/cvsweb.cgi/~checkout~/src/sys/kern/kern_tc.c > >> - how can I simulate a leap second, and see how the system reacts? > > Change the system time to a few minutes before any particular leap second > that your OS knows about (CF leapseconds file, if it has one) and see.
No. Your os does not know about leapseconds, and the only way ntpd knows is if the leapsecond flag in the packet exchanged with a server is set. Thus you would have to simulate packets coming in to your system. I believe that the leapsecond handling is actually in the kernel, not in ntpd. When ntpd tells the kernel to insert a leapsecond at the day turnover, then the system behaves as Mills decribes. (stops the clock for a second but returns a monotonic time output if the kernel clock is requested for time with a very small delta t.) Thus you would have to ask your kernel vendor how it behaves. Not sure what ntpd does on a Windows system. > > Regards, _______________________________________________ questions mailing list [email protected] http://lists.ntp.org/listinfo/questions
