diff options
author | Gary E. Miller <gem@rellim.com> | 2015-01-31 17:02:15 -0800 |
---|---|---|
committer | Gary E. Miller <gem@rellim.com> | 2015-01-31 17:02:15 -0800 |
commit | db26270fd7158d0416bea6cda8f7a2b2be5fd695 (patch) | |
tree | 349edb55451206d070d99d68aa44355261caf7a5 /libgpsd_core.c | |
parent | bdbc0e3e9f8cf942c3b68eaa5a6755ca715699d8 (diff) | |
download | gpsd-db26270fd7158d0416bea6cda8f7a2b2be5fd695.tar.gz |
Note loss of precision in ntpshm_latch()
Until we see a high precision GPS timestamp this can be
ignored.
Diffstat (limited to 'libgpsd_core.c')
-rw-r--r-- | libgpsd_core.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libgpsd_core.c b/libgpsd_core.c index b9868bfa..4d126b11 100644 --- a/libgpsd_core.c +++ b/libgpsd_core.c @@ -1667,6 +1667,10 @@ void ntpshm_latch(struct gps_device_t *device, struct timedrift_t /*@out@*/*td) else fix_time += device->device_type->time_offset(device); /* it's ugly but timestamp_t is double */ + /* note loss of precision here + * td->clock is in nanoSec + * fix_time is in microSec + * OK since GPS timestamps are millSec or worse */ fractional = modf(fix_time, &integral); /*@-type@*/ /* splint is confused about struct timespec */ td->real.tv_sec = (time_t)integral; |