Fix: use lttng_clock_gettime instead of clock_gettime
[lttng-tools.git] / tests / utils / utils.c
index 7aa8667d4f4520891d4b5d013ae752641897dde8..0b9655247e81ba30604b88891e352ed553e960a5 100644 (file)
 
 #include <stdint.h>
 #include <common/compat/time.h>
+#include <common/time.h>
 #include <assert.h>
 #include <unistd.h>
 #include <stdio.h>
 #include <errno.h>
 
-#define NSEC_PER_SEC 1000000000ULL
-#define NSEC_PER_USEC 1000ULL
-
 static inline
 int64_t elapsed_time_ns(struct timespec *t1, struct timespec *t2)
 {
@@ -57,7 +55,7 @@ int usleep_safe(useconds_t usec)
                        goto end;
                }
 
-               ret = clock_gettime(CLOCK_MONOTONIC, &t2);
+               ret = lttng_clock_gettime(CLOCK_MONOTONIC, &t2);
                if (ret) {
                        perror("clock_gettime");
                        goto end;
This page took 0.024479 seconds and 5 git commands to generate.