Merge pull request #2837 from abays/fix-collectd-tg-dtime
authorRuben Kerkhof <ruben@rubenkerkhof.com>
Tue, 26 Jun 2018 14:08:22 +0000 (16:08 +0200)
committerGitHub <noreply@github.com>
Tue, 26 Jun 2018 14:08:22 +0000 (16:08 +0200)
Use CLOCK_REALTIME for collectd-tg times (fixes issue 2219)

src/collectd-tg.c

index 4669c65..2d83bbf 100644 (file)
@@ -105,7 +105,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;