From c6e1eb9d421d2df13395b1b0ee720b80cfcfaf4b Mon Sep 17 00:00:00 2001 From: Ian Gulliver Date: Mon, 22 Feb 2016 16:59:42 -0800 Subject: [PATCH] Switch stats to use CLOCK_MONOTONIC_COARSE --- adsbus/stats.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/adsbus/stats.c b/adsbus/stats.c index 0ee5f97..b0bce6e 100644 --- a/adsbus/stats.c +++ b/adsbus/stats.c @@ -31,7 +31,7 @@ void stats_serialize(struct packet *packet, struct buf *buf) { json_object_set_new(counts, packet_type_names[i], json_integer(stats_state.type_count[i])); } struct timespec now; - assert(clock_gettime(CLOCK_MONOTONIC, &now) == 0); + assert(clock_gettime(CLOCK_MONOTONIC_COARSE, &now) == 0); json_t *out = json_pack("{sIso}", "uptime_seconds", (json_int_t) (now.tv_sec - stats_state.start.tv_sec), "packet_counts", counts);