summaryrefslogtreecommitdiff
path: root/indra/llcommon/llprocessor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llcommon/llprocessor.cpp')
-rw-r--r--indra/llcommon/llprocessor.cpp17
1 files changed, 8 insertions, 9 deletions
diff --git a/indra/llcommon/llprocessor.cpp b/indra/llcommon/llprocessor.cpp
index da49c31558..6de772071b 100644
--- a/indra/llcommon/llprocessor.cpp
+++ b/indra/llcommon/llprocessor.cpp
@@ -637,16 +637,15 @@ 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
+ if (!frequency) {
+ auto tbfrequency = getSysctlInt64("hw.tbfrequency");
+ struct clockinfo clockrate;
+ auto clockrate_len = sizeof(clockrate);
+ if (!sysctlbyname("kern.clockrate", &clockrate,
+ &clockrate_len, NULL, 0))
+ frequency = tbfrequency * clockrate.hz;
+ }
setInfo(eFrequency, (F64)frequency / (F64)1000000);
}