summaryrefslogtreecommitdiff
path: root/gpsd.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2011-09-20 22:52:57 -0400
committerEric S. Raymond <esr@thyrsus.com>2011-09-20 22:52:57 -0400
commita6f1d32121b7ce8b4cb9485f238eb62f23b75c7e (patch)
tree5fba20ea0ee790ac3b9373a237856c89bf4f9152 /gpsd.c
parente9034a445991b1fdceb6d536f5415b320c049e6a (diff)
downloadgpsd-a6f1d32121b7ce8b4cb9485f238eb62f23b75c7e.tar.gz
Remove the old latency-profiling machinery.
It hasn't actually worked since we switched protocols to JSON. This diff puts the framework in place for new machinery using timing attributes in the TPV sentence.
Diffstat (limited to 'gpsd.c')
-rw-r--r--gpsd.c19
1 files changed, 1 insertions, 18 deletions
diff --git a/gpsd.c b/gpsd.c
index 60e36db4..3b2fd7ce 100644
--- a/gpsd.c
+++ b/gpsd.c
@@ -1226,7 +1226,7 @@ static void handle_request(struct subscriber_t *sub,
for (devp = devices; devp < devices + MAXDEVICES; devp++) {
if (allocated_device(devp) && subscribed(sub, devp)) {
if ((devp->observed & GPS_TYPEMASK) != 0) {
- json_tpv_dump(&devp->gpsdata,
+ json_tpv_dump(&devp->gpsdata, &sub->policy,
reply + strlen(reply),
replylen - strlen(reply));
rstrip(reply);
@@ -1633,23 +1633,6 @@ static void consume_packets(struct gps_device_t *device)
if (buf[0] != '\0')
(void)throttled_write(sub, buf, strlen(buf));
-#ifdef TIMING_ENABLE
- if (buf[0] != '\0' && sub->policy.timing) {
- (void)snprintf(buf, sizeof(buf),
- "{\"class\":\"TIMING\","
- "\"tag\":\"%s\",\"len\":%d,"
- "\"xmit\":%lf,\"recv\":%lf,"
- "\"decode\":%lf,"
- "\"emit\":%lf}\r\n",
- device->gpsdata.tag,
- (int)device->packet.outbuflen,
- device->d_xmit_time,
- device->d_recv_time,
- device->d_decode_time,
- timestamp());
- (void)throttled_write(sub, buf, strlen(buf));
- }
-#endif /* TIMING_ENABLE */
}
}
}