mirror of
https://github.com/aristocratos/btop.git
synced 2024-09-27 22:01:29 +02:00
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) {
|
||||
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> {
|
||||
|
Loading…
Reference in New Issue
Block a user