From 61132d6c4068937b5e4181c08a9122270823506c Mon Sep 17 00:00:00 2001 From: Ico Doornekamp Date: Sat, 20 May 2023 08:41:12 +0200 Subject: [PATCH] os/time and janet_gettime now use CLOCK_MONOTONIC instead of CLOCK_REALTIM, this matches the description from the documentation of os/clock. Fixes issue #1144 --- src/core/util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/util.c b/src/core/util.c index 3c50bc94..4e7f8c22 100644 --- a/src/core/util.c +++ b/src/core/util.c @@ -902,7 +902,7 @@ int janet_gettime(struct timespec *spec) { } #else int janet_gettime(struct timespec *spec) { - return clock_gettime(CLOCK_REALTIME, spec); + return clock_gettime(CLOCK_MONOTONIC, spec); } #endif #endif