X-Git-Url: http://git.efficios.com/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Fust-clock.h;h=07920e060de574ac9184f2b15896dea8b907fa1b;hp=8493737634a72d8656e6ddb155aa68d6452c33ea;hb=c70636a7342f34e3be68fcf411cf3e3718b8e73f;hpb=fc0bb9faabea638797e5436a93175224b831ca6e diff --git a/src/bin/lttng-sessiond/ust-clock.h b/src/bin/lttng-sessiond/ust-clock.h index 849373763..07920e060 100644 --- a/src/bin/lttng-sessiond/ust-clock.h +++ b/src/bin/lttng-sessiond/ust-clock.h @@ -20,7 +20,7 @@ #ifndef _UST_CLOCK_H #define _UST_CLOCK_H -#include +#include #include #include #include @@ -29,7 +29,7 @@ #include #include -#include +#include /* 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; }