summaryrefslogtreecommitdiff
path: root/libgpsd_core.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2011-09-21 17:57:55 -0400
committerEric S. Raymond <esr@thyrsus.com>2011-09-21 17:57:55 -0400
commit6e340fcd58233569ee8e7cb3c7aa5b1152e99c87 (patch)
tree9fea2fd236c78e9964d26d298a7226ee6399cd1e /libgpsd_core.c
parent02ac9b9cd6d9416c2dd7fe9ba0d8456e0abe5316 (diff)
downloadgpsd-6e340fcd58233569ee8e7cb3c7aa5b1152e99c87.tar.gz
Describe the latency components.
Diffstat (limited to 'libgpsd_core.c')
-rw-r--r--libgpsd_core.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libgpsd_core.c b/libgpsd_core.c
index 0994f632..a482ea75 100644
--- a/libgpsd_core.c
+++ b/libgpsd_core.c
@@ -815,6 +815,9 @@ gps_mask_t gpsd_poll(struct gps_device_t *session)
#ifdef TIMING_ENABLE
/*
+ * Input just gecame available from a sensor, but no read from the
+ * device has yet been done.
+ *
* If we ever want a start-of-packet timestamp again, take it here
* with a test that session->packet.outbuflen is zero.
*
@@ -852,6 +855,7 @@ gps_mask_t gpsd_poll(struct gps_device_t *session)
#define MINIMUM_QUIET_TIME 0.25
if (session->packet.outbuflen == 0)
{
+ /* beginning of a new packet */
timestamp_t now = timestamp();
if (session->device_type != NULL && session->packet.start_time > 0) {
double quiet_time = (MINIMUM_QUIET_TIME * session->device_type->min_cycle);