On Wed, Apr 12, 2017 at 02:30:51PM +0000, Ian Thompson wrote: > If I do "adjtimex -p", I get a raw time e.g. 1492005529.681665099.
I assume that is some wrapper program around the adjtimex system call? > This is system time, but is it TAI, Unix time or UTC? The system call... ADJTIMEX(2) Linux Programmer's Manual ADJTIMEX(2) NAME adjtimex - tune kernel clock SYNOPSIS #define _BSD_SOURCE /* See feature_test_macros(7) */ #include <sys/timex.h> int adjtimex(struct timex *buf); ... returns UTC. > I was assuming it was seconds from 00:00:00 UTC without leap seconds. UTC always includes leap seconds by definition. > We are trying to timestamp some data collection with GPS time. > The stmicro MAC has an auxiliary register that can be updated with the clock > registers on an external event. > We clock that event at 4kHz and use the values in the auxiliary registers to > form the timestamp, which is a single 64bit value in uSeconds. > This value always seems to be 37 seconds off, even if I "correct" > stmmac_hwtstamp_ioctl to not use UTC. > > Is there something wrong with my thinking? I am not sure. Do you read /dev/ptpX to get those time stamps? What does 'testptp -c' say about your device? Thanks, Richard ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Linuxptp-users mailing list Linuxptp-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxptp-users