Path: blob/main/astro/astroterm/files/patch-src_stopwatch.c
16461 views
--- src/stopwatch.c.orig 2025-02-09 19:38:25 UTC1+++ src/stopwatch.c2@@ -34,7 +34,7 @@ int sw_gettime(struct SwTimestamp *stamp)3#elif defined(__APPLE__) && defined(__MACH__)4// Apple OSX and iOS (Darwin)56- unsigned long long tick = clock_gettime_nsec_np(CLOCK_MONOTONIC_RAW);7+ unsigned long long tick = clock_gettime_nsec_np(CLOCK_MONOTONIC);8if (tick == 0)9{10return -1;11@@ -47,7 +47,7 @@ int sw_gettime(struct SwTimestamp *stamp)12// Available on some POSIX systems (preferable to gettimeofday() below)1314struct timespec tick;15- int check = clock_gettime(CLOCK_MONOTONIC_RAW, &tick);16+ int check = clock_gettime(CLOCK_MONOTONIC, &tick);17if (check == -1)18{19return -1;202122