> It would be interesting to hear what (if any?) real-time kernels are used on > NTP servers and if that is one way to measure/generate 1PPS input/output.
There are 2 ways to process PPS timing. The traditional way is for a change on a modem control signal on a serial port to generate an interrupt which wakes up some user code which can then grab the time. On linux, ioctl TIOCMIWAIT does that. This path depends on the scheduler and load on the system and all that sort of stuff. You can do the same sort of thing with a GPIO pin. I don't have details handy. RFC 2783 describes the way ntpd uses PPS on most OSes. When the kernel gets an interrupt, it saves the time. The user program can poll to get the most recent time stamp. (The RFC describes an option to wake up a user program, but ntpd doesn't use that and most kernel's don't implement it.) On linux, you can see that info with something like: [murray@shuksan]$ cat /sys/devices/virtual/pps/pps0/assert 1440613664.998697746#6412351 [murray@shuksan]$ The stuff before the # is the time stamp. The number after the # is the PPS count. If you know the PPS is supposed to happen at a second boundary, that will give you the offset of your clock. If you know your clock is accurate, that will tell you when the pulse happened. -- These are my opinions. I hate spam. _______________________________________________ time-nuts mailing list -- [email protected] To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts and follow the instructions there.
