mirror of
https://github.com/SoftEtherVPN/SoftEtherVPN.git
synced 2024-11-22 17:39:53 +03:00
Unix.c: remove macOS-specific UnixGetTick64() implementation
clock_gettime() was implemented in macOS 10.12.
This commit is contained in:
parent
e530932df6
commit
19e837d81e
@ -128,8 +128,6 @@
|
||||
#include <Mayaqua/Mayaqua.h>
|
||||
|
||||
#ifdef UNIX_MACOS
|
||||
#include <mach/clock.h>
|
||||
#include <mach/mach.h>
|
||||
#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
|
||||
|
Loading…
Reference in New Issue
Block a user