mirror of
https://github.com/aristocratos/btop.git
synced 2024-05-29 16:50:20 +12:00
comment
This commit is contained in:
parent
b9d58e3faf
commit
c7f1e71e29
|
@ -270,7 +270,7 @@ namespace Cpu {
|
||||||
mib[1] = HW_CPU_FREQ;
|
mib[1] = HW_CPU_FREQ;
|
||||||
|
|
||||||
if (sysctl(mib, 2, &freq, &size, NULL, 0) < 0) {
|
if (sysctl(mib, 2, &freq, &size, NULL, 0) < 0) {
|
||||||
Logger::error("Failed to get CPU frequency: " + std::to_string(errno));
|
// this fails on Apple Silicon macs. Apparently you're not allowed to know
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
return std::to_string(freq / 1000.0 / 1000.0 / 1000.0).substr(0, 3);
|
return std::to_string(freq / 1000.0 / 1000.0 / 1000.0).substr(0, 3);
|
||||||
|
|
Loading…
Reference in a new issue