diff options
author | Gary E. Miller <gem@rellim.com> | 2018-10-29 16:52:46 -0700 |
---|---|---|
committer | Gary E. Miller <gem@rellim.com> | 2018-10-29 16:52:46 -0700 |
commit | 751201571b0a152f9727a70ca349a2290f0b9e3d (patch) | |
tree | 8975f7f0e5a56ce2ae27d56747f5c58476d4d33c /gpsd_json.c | |
parent | f4a541357a7b9df4168a4c8f931ffddf7a525f44 (diff) | |
download | gpsd-751201571b0a152f9727a70ca349a2290f0b9e3d.tar.gz |
rawdata_t: Split mtime into time and nsec.
And have to use t_real for mtime bacause json.c has no t_long type.
Diffstat (limited to 'gpsd_json.c')
-rw-r--r-- | gpsd_json.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gpsd_json.c b/gpsd_json.c index 5f4f531c..cc25b6da 100644 --- a/gpsd_json.c +++ b/gpsd_json.c @@ -731,7 +731,8 @@ void json_raw_dump(const struct gps_data_t *gpsdata, } (void)strlcpy(reply, "{\"class\":\"RAW\",", replylen); if (gpsdata->dev.path[0] != '\0') - str_appendf(reply, replylen, "\"device\":\"%s\",\"time\":%ld.%09ld,", + str_appendf(reply, replylen, + "\"device\":\"%s\",\"time\":%ld,\"nsec\":%9ld,", gpsdata->dev.path, (long)gpsdata->raw.mtime.tv_sec, gpsdata->raw.mtime.tv_nsec); |