utils.hpp: use arch defines for Apple correctly

This commit is contained in:
Sergey Fedorov 2024-01-03 23:47:33 +08:00
parent ec0f848030
commit 2108e17329

View File

@ -11,7 +11,7 @@
#include "ngcore_api.hpp" // for NGCORE_API and CPU arch macros
#if defined(__APPLE__) && defined(NETGEN_ARCH_ARM64)
#if defined(__APPLE__) && !defined(NETGEN_ARCH_AMD64)
#include <mach/mach_time.h>
#endif
@ -62,7 +62,7 @@ namespace ngcore
inline TTimePoint GetTimeCounter() noexcept
{
#if defined(__APPLE__) && defined(NETGEN_ARCH_ARM64)
#if defined(__APPLE__) && !defined(NETGEN_ARCH_AMD64)
return mach_absolute_time();
#elif defined(NETGEN_ARCH_AMD64)
return __rdtsc();