From 19e837d81e86cd6ece13fe8a297039687c925d18 Mon Sep 17 00:00:00 2001 From: Davide Beatrici Date: Fri, 24 Aug 2018 06:43:45 +0200 Subject: [PATCH] Unix.c: remove macOS-specific UnixGetTick64() implementation clock_gettime() was implemented in macOS 10.12. --- src/Mayaqua/Unix.c | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/src/Mayaqua/Unix.c b/src/Mayaqua/Unix.c index 1b9949ac..185abed9 100755 --- a/src/Mayaqua/Unix.c +++ b/src/Mayaqua/Unix.c @@ -128,8 +128,6 @@ #include #ifdef UNIX_MACOS -#include -#include #ifdef NO_VLAN // Struct statfs for MacOS X typedef struct fsid { int32_t val[2]; } fsid_t; @@ -2092,23 +2090,9 @@ UINT64 UnixGetTick64() } return ret; - -#else -#ifdef UNIX_MACOS - static clock_serv_t clock_serv = 0; - mach_timespec_t t; - UINT64 ret; - if (clock_serv == 0) { - host_get_clock_service(mach_host_self(), SYSTEM_CLOCK, &clock_serv); - } - clock_get_time(clock_serv, &t); - ret = ((UINT64)((UINT32)t.tv_sec)) * 1000LL + (UINT64)t.tv_nsec / 1000000LL; - return ret; #else return TickRealtimeManual(); #endif - -#endif } // Get the system timer