diff options
author | Gary E. Miller <gem@rellim.com> | 2010-08-12 11:38:40 -0700 |
---|---|---|
committer | Gary E. Miller <gem@rellim.com> | 2010-08-12 11:38:40 -0700 |
commit | b695ed08693ad62118da670d8878a63c8d0bf6da (patch) | |
tree | f922aead9222f0f5daaaa9cb4cdf00afb3d9fe34 /libgpsd_core.c | |
parent | 9dece5f8532670c42f5720ddfae3294d89371c7e (diff) | |
download | gpsd-b695ed08693ad62118da670d8878a63c8d0bf6da.tar.gz |
tv_usec != tv_nsec, make adjustment for chrony SOCK.
Diffstat (limited to 'libgpsd_core.c')
-rw-r--r-- | libgpsd_core.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libgpsd_core.c b/libgpsd_core.c index 95399230..fbb73a47 100644 --- a/libgpsd_core.c +++ b/libgpsd_core.c @@ -520,7 +520,7 @@ static /*@null@*/ void *gpsd_ppsmonitor(void *arg) /* pick the right edge */ if ( kpps_edge ) { sample.tv.tv_sec = pi.assert_timestamp.tv_sec; - sample.tv.tv_usec = pi.assert_timestamp.tv_nsec; + sample.tv.tv_usec = pi.assert_timestamp.tv_nsec / 1000; sample.offset -= pi.assert_timestamp.tv_sec; sample.offset -= ((double)pi.assert_timestamp.tv_nsec) / 1000000000; /* ntpshm_pps() expects usec, not nsec */ @@ -528,7 +528,7 @@ static /*@null@*/ void *gpsd_ppsmonitor(void *arg) (void)ntpshm_pps(session, (struct timeval*)&pi.assert_timestamp); } else { sample.tv.tv_sec = pi.clear_timestamp.tv_sec; - sample.tv.tv_usec = pi.clear_timestamp.tv_nsec; + sample.tv.tv_usec = pi.clear_timestamp.tv_nsec / 1000; sample.offset -= pi.clear_timestamp.tv_sec; sample.offset -= ((double)pi.clear_timestamp.tv_nsec) / 1000000000; pi.clear_timestamp.tv_nsec /= 1000; |