From: Mathieu Desnoyers Date: Thu, 17 Nov 2011 18:38:56 +0000 (-0500) Subject: clock.h: ensure all functions are trivial (10 lines or less) X-Git-Tag: v1.9.1~88 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=f0e3ea68e03c7d0f757841af2a240edb5506393d;p=lttng-ust.git clock.h: ensure all functions are trivial (10 lines or less) Signed-off-by: Mathieu Desnoyers --- diff --git a/include/lttng/clock.h b/include/lttng/clock.h index ebcd624f..3de1fa81 100644 --- a/include/lttng/clock.h +++ b/include/lttng/clock.h @@ -38,14 +38,9 @@ static __inline__ uint64_t trace_clock_read64(void) { struct timespec ts; - uint64_t retval; clock_gettime(CLOCK_MONOTONIC, &ts); - retval = ts.tv_sec; - retval *= 1000000000; - retval += ts.tv_nsec; - - return retval; + return (ts.tv_sec * 1000000000) + ts.tv_nsec; } #if __i386__ || __x86_64__