From: Duncaen Date: Tue, 12 Dec 2017 02:07:52 +0000 (+0100) Subject: persist_timestamp: use CLOCK_MONOTONIC_RAW X-Git-Tag: v6.6~53 X-Git-Url: https://git.armaanb.net/?p=opendoas.git;a=commitdiff_plain;h=492b5e3952ed05a8340d08c9167687b406736b76 persist_timestamp: use CLOCK_MONOTONIC_RAW --- 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");