1
0
mirror of https://github.com/janet-lang/janet synced 2024-06-26 15:13:16 +00:00

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

This commit is contained in:
Ico Doornekamp 2023-05-20 08:41:12 +02:00
parent fc8c6a429e
commit 61132d6c40

View File

@ -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