From 492b5e3952ed05a8340d08c9167687b406736b76 Mon Sep 17 00:00:00 2001 From: Duncaen Date: Tue, 12 Dec 2017 03:07:52 +0100 Subject: [PATCH 1/1] persist_timestamp: use CLOCK_MONOTONIC_RAW --- persist_timestamp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/persist_timestamp.c b/persist_timestamp.c index c608dca..c8f4bb5 100644 --- a/persist_timestamp.c +++ b/persist_timestamp.c @@ -171,7 +171,7 @@ persist_check(int fd, int secs) if (!timespecisset(&ts_mono) || !timespecisset(&ts_real)) errx(1, "timespecisset"); - if (clock_gettime(CLOCK_MONOTONIC, &mono) == -1 || + if (clock_gettime(CLOCK_MONOTONIC_RAW, &mono) == -1 || clock_gettime(CLOCK_REALTIME, &real) == -1) err(1, "clock_gettime"); @@ -196,7 +196,7 @@ persist_set(int fd, int secs) { struct timespec mono, real, ts_mono, ts_real, timeout; - if (clock_gettime(CLOCK_MONOTONIC, &mono) == -1 || + if (clock_gettime(CLOCK_MONOTONIC_RAW, &mono) == -1 || clock_gettime(CLOCK_REALTIME, &real) == -1) err(1, "clock_gettime"); -- 2.39.2