summaryrefslogtreecommitdiff
path: root/ppsthread.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2013-11-03 09:15:55 -0500
committerEric S. Raymond <esr@thyrsus.com>2013-11-03 09:15:55 -0500
commit3f49461c5fd50436fe133adc7a8121144305ad64 (patch)
treeceab366251f3aff48bc125593544c6e96e9e2b16 /ppsthread.c
parent34eaeaeb7af755e07166947de515bc0d04226427 (diff)
downloadgpsd-3f49461c5fd50436fe133adc7a8121144305ad64.tar.gz
Use timedrift_t for all hook arguments.
No logic changes in this commit. We push naosecond precision closer to where time hints are shipped. Changes to ppsthread.c are kept minimal; it needs a cleanup but that will be done in another change that can be separately reviewed. All regression tests pass. PPS is live in gpsmon and reported by gpsd.
Diffstat (limited to 'ppsthread.c')
-rw-r--r--ppsthread.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/ppsthread.c b/ppsthread.c
index bbaae795..88e1e134 100644
--- a/ppsthread.c
+++ b/ppsthread.c
@@ -486,14 +486,19 @@ static /*@null@*/ void *gpsd_ppsmonitor(void *arg)
(long)l_offset);
log1 = "timestamp out of range";
} else {
+ struct timedrift_t drift;
+ drift.real.tv_sec = actual_tv.tv_sec;
+ drift.real.tv_nsec = 0;
+ drift.clock = ts;
last_second_used = session->last_fixtime;
if (session->thread_report_hook != NULL)
log1 = session->thread_report_hook(session,
- &actual_tv, &ts, edge_offset);
+ &drift, edge_offset);
else
log1 = "no report hook";
if (session->context->pps_hook != NULL)
- session->context->pps_hook(session, actual_tv.tv_sec, &ts);
+ session->context->pps_hook(session,
+ &drift, edge_offset);
}
gpsd_report(session->context->debug, LOG_RAW,
"PPS edge %.20s %lu.%06lu offset %.9f\n",