Fix clock source overflow on 32-bit archs
[lttng-ust.git] / liblttng-ust / clock.h
index 3de1fa81ec0a7704bafcd2aa55e44673ffd1d466..23294d2b8c2fdf771d043e775b83664ab3d19549 100644 (file)
@@ -24,7 +24,6 @@
 #include <sys/time.h>
 #include <stdint.h>
 #include <stddef.h>
-#include <lttng/core.h>
 
 /* TRACE CLOCK */
 
@@ -40,16 +39,9 @@ static __inline__ uint64_t trace_clock_read64(void)
        struct timespec ts;
 
        clock_gettime(CLOCK_MONOTONIC, &ts);
-       return (ts.tv_sec * 1000000000) + ts.tv_nsec;
+       return ((uint64_t) ts.tv_sec * 1000000000ULL) + ts.tv_nsec;
 }
 
-#if __i386__ || __x86_64__
-static __inline__ uint64_t trace_clock_frequency(void)
-{
-       return 1000000000LL;
-}
-#endif /* #else #if __i386__ || __x86_64__ */
-
 static __inline__ uint32_t trace_clock_freq_scale(void)
 {
        return 1;
This page took 0.038352 seconds and 4 git commands to generate.