clock.h: ensure all functions are trivial (10 lines or less)
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 17 Nov 2011 18:38:56 +0000 (13:38 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 17 Nov 2011 18:38:56 +0000 (13:38 -0500)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
include/lttng/clock.h

index ebcd624ff74e77d28e4ef6b220d4d4c55ed31826..3de1fa81ec0a7704bafcd2aa55e44673ffd1d466 100644 (file)
 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__
This page took 0.0257 seconds and 4 git commands to generate.