diff options
-rw-r--r-- | indra/llcommon/llprocessor.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/indra/llcommon/llprocessor.cpp b/indra/llcommon/llprocessor.cpp index cf97e7d7da..da49c31558 100644 --- a/indra/llcommon/llprocessor.cpp +++ b/indra/llcommon/llprocessor.cpp @@ -637,7 +637,16 @@ public: LLProcessorInfoDarwinImpl() { getCPUIDInfo(); +#ifdef __arm64__ + auto frequency = getSysctlInt64("hw.tbfrequency"); + struct clockinfo clockrate; + auto clockrate_len = sizeof(clockrate); + if (!sysctlbyname("kern.clockrate", &clockrate, &clockrate_len, + NULL, 0)) + frequency *= clockrate.hz; +#else uint64_t frequency = getSysctlInt64("hw.cpufrequency"); +#endif setInfo(eFrequency, (F64)frequency / (F64)1000000); } |