On Mon, May 18, 2020 at 08:58:09AM +0200, Werner Macho wrote: > So my questions are: > Is there something I can call to get the very exact time without syncing > the hardware clock on the computer? (I 'only' need a exact timestamp > without considering the computers HW-clock) > Would this somehow also be possible to call on a directly connected > computer on LAN? > Or better: Is this even possible at all?
If you need a time stamp from a over an Ethernet network, then you need to exchange Ethernet frames. But you are not allowed to do even that? Then you are out of luck. If you can run PTP, I suggest: 1. Run ptp4l using the --free_running=1 mode. 2. Figure the time offset between the local clock and the remote clock using TIME_STATUS_NP: # designed for use with gPTP and free_running master_offset 0 ingress_time 0 cumulativeScaledRateOffset +0.000000000 scaledLastGmPhaseChange 0 gmTimeBaseIndicator 0 lastGmPhaseChange 0x0000'0000000000000000.0000 gmPresent false gmIdentity e89a8f.fffe.74f796 3. Take your local time stamps via vdso (ie clock_gettime). 4. Use the result of step 2 to figure the global time of the time stamps in step 3. HTH, Richard _______________________________________________ Linuxptp-users mailing list Linuxptp-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxptp-users