barectf-platform-linux-fs.c: use `CLOCK_REALTIME`
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Thu, 17 Sep 2020 00:57:52 +0000 (20:57 -0400)
committerPhilippe Proulx <eeppeliteloop@gmail.com>
Thu, 17 Sep 2020 13:28:36 +0000 (09:28 -0400)
Although this clock source can go back, the result is more friendly than
using `CLOCK_MONOTONIC` and having to set the clock type's offset
manually or getting invalid event record times.

I believe this is acceptable considering the demonstration purpose of
this platform.

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
platforms/linux-fs/barectf-platform-linux-fs.c

index 7888aad6d6b96e1d3084a61881df77c01ed3032f..09c5be250c75af97d66f564e738b0c52d65d6440 100644 (file)
@@ -53,7 +53,7 @@ static uint64_t get_clock(void* data)
 {
        struct timespec ts;
 
-       clock_gettime(CLOCK_MONOTONIC, &ts);
+       clock_gettime(CLOCK_REALTIME, &ts);
 
        return ts.tv_sec * 1000000000ULL + ts.tv_nsec;
 }
This page took 0.024369 seconds and 4 git commands to generate.