mirror of
https://github.com/aristocratos/btop.git
synced 2024-05-19 11:52:46 +12:00
Fixed: Moved up get_cpuHz() in the execution order to get better cpu clock reading.
This commit is contained in:
parent
2247ed3db1
commit
9f0fcdd5bf
|
@ -667,6 +667,9 @@ namespace Cpu {
|
|||
if (Runner::stopping or (no_update and not current_cpu.cpu_percent.at("total").empty())) return current_cpu;
|
||||
auto& cpu = current_cpu;
|
||||
|
||||
if (Config::getB("show_cpu_freq"))
|
||||
cpuHz = get_cpuHz();
|
||||
|
||||
ifstream cread;
|
||||
|
||||
try {
|
||||
|
@ -794,9 +797,6 @@ namespace Cpu {
|
|||
else throw std::runtime_error("Cpu::collect() : " + string{e.what()});
|
||||
}
|
||||
|
||||
if (Config::getB("show_cpu_freq"))
|
||||
cpuHz = get_cpuHz();
|
||||
|
||||
if (Config::getB("check_temp") and got_sensors)
|
||||
update_sensors();
|
||||
|
||||
|
|
Loading…
Reference in a new issue