summaryrefslogtreecommitdiff
path: root/driver_proto.c
diff options
context:
space:
mode:
authorGary E. Miller <gem@rellim.com>2010-04-18 21:23:42 -0700
committerGary E. Miller <gem@rellim.com>2010-04-18 21:23:42 -0700
commit0e7ff3dcd0e44e9b0b556e1770cc55e6ac723d68 (patch)
treeb9c4ce369c11e4b91714e1c3cd582e38fbae6ad6 /driver_proto.c
parent948770e120fe7028ed0f65c539b9dda129ee2a31 (diff)
downloadgpsd-0e7ff3dcd0e44e9b0b556e1770cc55e6ac723d68.tar.gz
Eliminate a lot of private copies of gps_tow for one global copy in
sesion->context.
Diffstat (limited to 'driver_proto.c')
-rw-r--r--driver_proto.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/driver_proto.c b/driver_proto.c
index a140c640..79fa4b7b 100644
--- a/driver_proto.c
+++ b/driver_proto.c
@@ -156,8 +156,10 @@ _proto__msg_utctime(struct gps_device_t *session, unsigned char *buf, size_t dat
gps_week = GET_WEEKNUMBER();
session->context->gps_week = gps_week;
session->context->leap_seconds = GET_GPS_LEAPSECONDS();
+ session->context->gps_tow = tow / 1000.0;
- t = gpstime_to_unix(gps_week, tow/1000.0) - session->context->leap_seconds;
+ t = gpstime_to_unix(gps_week, session->context->gps_tow)
+ - session->context->leap_seconds;
session->newdata.time = t;
return TIME_IS | ONLINE_IS;