From 5e645f11b2c9ffb5ea6b6672732ffdbfb792880b Mon Sep 17 00:00:00 2001 From: Amaan Qureshi Date: Tue, 3 Dec 2024 16:25:56 -0500 Subject: [PATCH] fix(lib): use `clock_gettime` on macOS again (cherry picked from commit 69d977d73648010d7060001fa518f3198a41a7e5) --- lib/src/clock.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/src/clock.h b/lib/src/clock.h index 5d246ca7..7a13185e 100644 --- a/lib/src/clock.h +++ b/lib/src/clock.h @@ -49,9 +49,9 @@ static inline bool clock_is_gt(TSClock self, TSClock other) { return self > other; } -#elif defined(CLOCK_MONOTONIC) && !defined(__APPLE__) +#elif defined(CLOCK_MONOTONIC) -// POSIX with monotonic clock support (Linux) +// POSIX with monotonic clock support (Linux, macOS) // * Represent a time as a monotonic (seconds, nanoseconds) pair. // * Represent a duration as a number of microseconds. // @@ -102,7 +102,7 @@ static inline bool clock_is_gt(TSClock self, TSClock other) { #else -// macOS or POSIX without monotonic clock support +// POSIX without monotonic clock support // * Represent a time as a process clock value. // * Represent a duration as a number of process clock ticks. //