#include <time.h>
#include <unistd.h>
-#include "utils_heap.h"
+#include "utils/heap/heap.h"
#include "collectd/client.h"
#include "collectd/network.h"
exit(exit_status);
} /* }}} void exit_usage */
-static void signal_handler(int signal) /* {{{ */
+static void signal_handler(int __attribute__((unused)) signal) /* {{{ */
{
loop = false;
} /* }}} void signal_handler */
{
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;
strncpy(vl->identifier.type,
(vl->values_types[0] == LCC_TYPE_GAUGE) ? "gauge" : "derive",
sizeof(vl->identifier.type));
- vl->identifier.type[sizeof(vl->identifier.type) - 1] = 0;
+ vl->identifier.type[sizeof(vl->identifier.type) - 1] = '\0';
snprintf(vl->identifier.type_instance, sizeof(vl->identifier.type_instance),
"ti%li", random());