diff options
author | Gary E. Miller <gem@rellim.com> | 2013-10-18 22:06:30 -0700 |
---|---|---|
committer | Gary E. Miller <gem@rellim.com> | 2013-10-18 22:06:30 -0700 |
commit | fe5137e56c01b8e64b521accb345f975b9c7ebd6 (patch) | |
tree | 752ad0a874fca828e8d50528ee686ba1307b7bc1 /gpsd.c | |
parent | 6f5b1ecfba1685d3f1b150539db5d07ceef30cee (diff) | |
download | gpsd-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.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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 */ |