summaryrefslogtreecommitdiff
path: root/gpsd.c
diff options
context:
space:
mode:
authorGary E. Miller <gem@rellim.com>2013-10-18 22:06:30 -0700
committerGary E. Miller <gem@rellim.com>2013-10-18 22:06:30 -0700
commitfe5137e56c01b8e64b521accb345f975b9c7ebd6 (patch)
tree752ad0a874fca828e8d50528ee686ba1307b7bc1 /gpsd.c
parent6f5b1ecfba1685d3f1b150539db5d07ceef30cee (diff)
downloadgpsd-fe5137e56c01b8e64b521accb345f975b9c7ebd6.tar.gz
ntpd now can handle nSec. So all PPS hangling moving from uSec to
nSec. Move that direction by imrpoving pps_hook from uSec to nSec.
Diffstat (limited to 'gpsd.c')
-rw-r--r--gpsd.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gpsd.c b/gpsd.c
index 5f278422..d05ec7a6 100644
--- a/gpsd.c
+++ b/gpsd.c
@@ -1661,13 +1661,13 @@ static int handle_gpsd_request(struct subscriber_t *sub, const char *buf)
#ifdef PPS_ENABLE
static void ship_pps_drift_message(struct gps_device_t *session,
unsigned long sec,
- struct timeval *tv)
+ struct timespec *ts)
/* on PPS interrupt, ship a drift message to all clients */
{
#ifdef SOCKET_EXPORT_ENABLE
- notify_watchers(session, "{\"class\":\"PPS\",\"device\":\"%s\",\"real_sec\":%ld, \"real_musec\":0,\"clock_sec\":%ld,\"clock_musec\":%ld}\r\n",
+ notify_watchers(session, "{\"class\":\"PPS\",\"device\":\"%s\",\"real_sec\":%ld, \"real_nsec\":0,\"clock_sec\":%ld,\"clock_nsec\":%ld}\r\n",
session->gpsdata.dev.path,
- sec, tv->tv_sec, tv->tv_usec);
+ sec, ts->tv_sec, ts->tv_nsec);
#endif /* SOCKET_EXPORT_ENABLE */
}
#endif /* PPS_ENABLE */