Replace libuuid with internal implementation
[lttng-tools.git] / src / bin / lttng-sessiond / ust-clock.h
index 8493737634a72d8656e6ddb155aa68d6452c33ea..07920e060de574ac9184f2b15896dea8b907fa1b 100644 (file)
@@ -20,7 +20,7 @@
 #ifndef _UST_CLOCK_H
 #define _UST_CLOCK_H
 
-#include <time.h>
+#include <common/compat/time.h>
 #include <sys/time.h>
 #include <stdint.h>
 #include <stddef.h>
@@ -29,7 +29,7 @@
 #include <urcu/arch.h>
 #include <lttng/ust-clock.h>
 
-#include <common/compat/uuid.h>
+#include <common/uuid.h>
 
 /* TRACE CLOCK */
 
@@ -57,7 +57,12 @@ uint64_t trace_clock_read64_monotonic(void)
 {
        struct timespec ts;
 
-       clock_gettime(CLOCK_MONOTONIC, &ts);
+       if (lttng_clock_gettime(CLOCK_MONOTONIC, &ts)) {
+               /* TODO Report error cleanly up the chain. */
+               PERROR("clock_gettime CLOCK_MONOTONIC");
+               ts.tv_sec = 0;
+               ts.tv_nsec = 0;
+       }
        return ((uint64_t) ts.tv_sec * 1000000000ULL) + ts.tv_nsec;
 }
 
This page took 0.02616 seconds and 5 git commands to generate.