clock: add clock description to metadata
[lttng-ust.git] / liblttng-ust / clock.h
index ed191b0bf9b7ca4b75a55ddbb17682e052b0ad4c..95e3e43b16d0863f412c10082151f3c924ab9cbe 100644 (file)
 
 /* Choosing correct trace clock */
 
-static __inline__ uint64_t trace_clock_read64(void)
+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)
+static __inline__
+uint64_t trace_clock_freq(void)
 {
-       return 1000000000LL;
+       return 1000000000ULL;
 }
-#endif /* #else #if __i386__ || __x86_64__ */
 
-static __inline__ uint32_t trace_clock_freq_scale(void)
+static __inline__
+const char *trace_clock_uuid(void)
 {
-       return 1;
+       return "CLOCK_MONOTONIC";
 }
 
 #endif /* _UST_CLOCK_H */
This page took 0.023883 seconds and 4 git commands to generate.