summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2015-03-20 08:44:19 -0400
committerEric S. Raymond <esr@thyrsus.com>2015-03-20 08:44:19 -0400
commit9d0a03d007191bbd004706722992ca6b0fcd7ece (patch)
tree4d70d39fa41704622e39e0e39d43049c9cf04ca5
parent8edcc43df17e994395b7680c12b53644754c234d (diff)
downloadgpsd-9d0a03d007191bbd004706722992ca6b0fcd7ece.tar.gz
Acccept doing synchronization logging at only 1s granularity to remove floats.
All regression tests pass.
-rw-r--r--gpsd.c2
-rw-r--r--libgpsd_core.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/gpsd.c b/gpsd.c
index 10a4042a..a0a9ecf7 100644
--- a/gpsd.c
+++ b/gpsd.c
@@ -2418,7 +2418,7 @@ int main(int argc, char *argv[])
if (device_needed && BAD_SOCKET(device->gpsdata.gps_fd) &&
(device->opentime == 0 ||
- timestamp() - device->opentime > DEVICE_RECONNECT)) {
+ time(NULL) - device->opentime > DEVICE_RECONNECT)) {
device->opentime = time(NULL);
gpsd_log(&context.errout, LOG_INF,
"reconnection attempt on device %d\n",
diff --git a/libgpsd_core.c b/libgpsd_core.c
index 70670d8d..65ff50d4 100644
--- a/libgpsd_core.c
+++ b/libgpsd_core.c
@@ -1325,10 +1325,10 @@ gps_mask_t gpsd_poll(struct gps_device_t *session)
/*@-nullderef@*/
/* coverity[var_deref_op] */
gpsd_log(&session->context->errout, LOG_INF,
- "%s identified as type %s, %f sec @ %ubps\n",
+ "%s identified as type %s, %ld sec @ %ubps\n",
session->gpsdata.dev.path,
session->device_type->type_name,
- timestamp() - session->opentime,
+ time(NULL) - session->opentime,
(unsigned int)speed);
/*@+nullderef@*/