X-Git-Url: http://git.lttng.org/?a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Fust-clock.h;h=c2e0cbcc394a9708f16801802761169e8cd0ea6d;hb=590443826971128e4217a20ce79c46562cdbc11c;hp=8493737634a72d8656e6ddb155aa68d6452c33ea;hpb=684d7890cab7ed9cf530546bb22b3364b64538a5;p=lttng-tools.git diff --git a/src/bin/lttng-sessiond/ust-clock.h b/src/bin/lttng-sessiond/ust-clock.h index 849373763..c2e0cbcc3 100644 --- a/src/bin/lttng-sessiond/ust-clock.h +++ b/src/bin/lttng-sessiond/ust-clock.h @@ -57,7 +57,12 @@ uint64_t trace_clock_read64_monotonic(void) { struct timespec ts; - clock_gettime(CLOCK_MONOTONIC, &ts); + if (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; }