Hi Richard,

Thanks for your answer!
So if I understand correctly I can run

pmc -u -b 0 'GET TIME_STATUS_NP'

to get
sending: GET TIME_STATUS_NP
        98f2b3.fffe.138691-0 seq 0 RESPONSE MANAGEMENT TIME_STATUS_NP
                master_offset              14
                ingress_time               1589869722179953606
                cumulativeScaledRateOffset +0.000000000
                scaledLastGmPhaseChange    0
                gmTimeBaseIndicator        0
                lastGmPhaseChange          0x0000'0000000000000000.0000
                gmPresent                  true
                gmIdentity                 0080ea.fffe.bd9a70

locally on the machine with connected hardware (which should be enough for
now).
And compare ingress_time to the timestamp I get when I use the local
hardware clock (which I am not allowed to sync with ptp).

Or is ingress_time the wrong time to use if I am not syncing?

For now all I need is the exact difference between what PTP would deliver
compared to the local systemtime.
Thanks a lot!
regards
Werner

On Mon, May 18, 2020 at 4:06 PM Richard Cochran <richardcoch...@gmail.com>
wrote:

> 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

Reply via email to