From f8ee46d1c6d75fede6bf57a632ce731e1cecd5b8 Mon Sep 17 00:00:00 2001 From: casqade Date: Wed, 27 Mar 2024 15:47:23 +0300 Subject: [PATCH] fix: undeclared identifier on macOS --- src/Duration.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Duration.cpp b/src/Duration.cpp index fa038f2..45a62e9 100644 --- a/src/Duration.cpp +++ b/src/Duration.cpp @@ -19,7 +19,7 @@ Now() LARGE_INTEGER currentTime; QueryPerformanceCounter( ¤tTime ); -#elif defined(TIME_UTILS_LIN) || defined(TIME_UTILS_MAC) +#elif defined(TIME_UTILS_LIN) timespec currentTime; clock_gettime( CLOCK_MONOTONIC, ¤tTime ); @@ -58,7 +58,7 @@ SleepUntil( ::Sleep(1); #elif defined(TIME_UTILS_MAC) - timespec timeToSleep = duration; + timespec timeToSleep = timestamp; return clock_nanosleep_abstime(&timeToSleep) == 0; #else