[Linuxptp-users] Measure the accuracy of system time respect to the PHC time
PTP IEEE 1588 stack for Linux
Brought to you by:
rcochran
From: Ledda W. E. <Wil...@it...> - 2013-08-22 12:16:42
|
Hi all, I need to measure the accuracy of the system time respect to the time from the PHC. With the two clock synchronize with phc2sys I've tried the following clock_gettime(CLOCK_REALTIME, &ts) clock_gettime(phc, &tphc) accuracy = ts - tphc In this way the accuracy is always about 3 us. I'm a bit confused about the difference between this value and the offset reported from phc2sys (always under 1us). I have seen the code in order to find the reason of this difference and I understand that the offset is calculated reading the PHC between two system time and assuming that the PHC is exacltly in the half between them. My question is: which is the best way to measure the accuracy between the system time and the PTP time? |