From: Andrew Bays Date: Mon, 25 Jun 2018 14:12:07 +0000 (-0400) Subject: Use CLOCK_REALTIME for collectd-tg times (fixes issue 2219) X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=ffba5b8b514103329bd82f8d773194fb7744f55a;p=collectd.git Use CLOCK_REALTIME for collectd-tg times (fixes issue 2219) --- diff --git a/src/collectd-tg.c b/src/collectd-tg.c index 48f2dc43..511cf5bf 100644 --- a/src/collectd-tg.c +++ b/src/collectd-tg.c @@ -104,7 +104,7 @@ static double dtime(void) /* {{{ */ { struct timespec ts = {0}; - if (clock_gettime(CLOCK_MONOTONIC, &ts) != 0) + if (clock_gettime(CLOCK_REALTIME, &ts) != 0) perror("clock_gettime"); return (double)ts.tv_sec + (double)ts.tv_nsec / 1e9;