mirror of https://github.com/aristocratos/btop.git
CPU freq in GHz
This commit is contained in:
parent
a5f10f1a0f
commit
6bb0e930a2
|
@ -272,7 +272,7 @@ namespace Cpu {
|
||||||
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));
|
Logger::error("Failed to get CPU frequency: " + std::to_string(errno));
|
||||||
}
|
}
|
||||||
return std::to_string(freq);
|
return std::to_string(freq / 1000.0 / 1000.0 / 1000.0).substr(0, 3);
|
||||||
}
|
}
|
||||||
|
|
||||||
auto get_core_mapping() -> unordered_flat_map<int, int> {
|
auto get_core_mapping() -> unordered_flat_map<int, int> {
|
||||||
|
|
Loading…
Reference in New Issue