How do I use ntpd to synchronize the system clock with that of PTP server. How do i adjust the system clock (rtc) with the date and time precision upto microsecond
rtc -s hw
The first syncs system time by ntp. The second syncs hw rtc with system.
I don’t there are hardware clocks that reveal accuracy to a microsecond.
I don’t there are hardware clocks that reveal accuracy to a microsecond
True, the cmos clock on a PC cannot hold microsecond resolution - apparently 122us is its limit.
Neither can the o/s system clock (1000us)
BUT you could synchronize the free-running cpu timestamp register (en.wikipedia.org/wiki/Time_Stamp_Counter) with ntp.
To synchronize with ntp (theoretical resolution better than 1ns), you must use an algorithm which takes network delay into account. See en.wikipedia.org/wiki/Network_Time_Protocol (Clock synchronization algorithm).
QNX uses the cpu timestamp register for kernel event traces to get sub-microsecond resolutions.