diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2015-03-20 08:44:19 -0400 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2015-03-20 08:44:19 -0400 |
commit | 9d0a03d007191bbd004706722992ca6b0fcd7ece (patch) | |
tree | 4d70d39fa41704622e39e0e39d43049c9cf04ca5 | |
parent | 8edcc43df17e994395b7680c12b53644754c234d (diff) | |
download | gpsd-9d0a03d007191bbd004706722992ca6b0fcd7ece.tar.gz |
Acccept doing synchronization logging at only 1s granularity to remove floats.
All regression tests pass.
-rw-r--r-- | gpsd.c | 2 | ||||
-rw-r--r-- | libgpsd_core.c | 4 |
2 files changed, 3 insertions, 3 deletions
@@ -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@*/ |