Hi Richard, Can you please clarify few of my questions on the system time synchronized by phc2sys?
I am running ptp4l service as the slave in the system that I understand it synchronizes the phc (hw clock) to the GMC. I am also running phc2sys which synchronizes the system time to the phc clock that is being synchronized by ptp4l. Now my application needs to use the system time that uses PTP timescale, not UTC.. I figured out I should be using clock_gettime(). But confused with different clock ids we have - CLOCK_MONOTONIC, CLOCK_REALTIME, CLOCK_MONOTONIC_RAW, CLOCK_REALTIME_COARSE, CLOCK_MONOTONIC_COARSE, CLOCK_REALTIME_ALARM, CLOCK_TAI etc. Please help me understand the differences of these different clock types? which are CLOCK_MONOTONIC, CLOCK_REALTIME, CLOCK_MONOTONIC_RAW, CLOCK_REALTIME_COARSE, CLOCK_MONOTONIC_COARSE, CLOCK_REALTIME_ALARM, CLOCK_TAI etc. Thank you in advance! ----- Forwarded message ----- From: Nemo Crypto <nemo0948.cry...@gmail.com>To: linuxptp-users@lists.sourceforge.net <linuxptp-users@lists.sourceforge.net>Sent: Thursday, 27 October, 2022 at 04:03:58 pm GMT-4Subject: clock_gettime() and clock_id Hi All, Can you please clarify few of my questions on getting the system time synchronized by ptp? I am running ptp4l service as the slave in the system that I understand it synchronizes the phc (hw clock) to the GMC. I am also running phc2sys which synchronizes the system time to the phc clock that is being synchronized by ptp4l. Now my application needs to use the system time that uses PTP timescale, not UTC.. I figured out I should be using clock_gettime(). But confused with different clock ids we have - CLOCK_MONOTONIC, CLOCK_REALTIME, CLOCK_MONOTONIC_RAW, CLOCK_REALTIME_COARSE, CLOCK_MONOTONIC_COARSE, CLOCK_REALTIME_ALARM, CLOCK_TAI etc. Please help me understand the differences? Thank you in advance!
_______________________________________________ Linuxptp-users mailing list Linuxptp-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxptp-users