mirror of
https://github.com/aristocratos/btop.git
synced 2024-05-05 04:54:06 +12:00
Merge pull request #771 from Derppening/fix/linux-battery-wattage
This commit is contained in:
commit
e1575a1fca
|
@ -835,7 +835,7 @@ namespace Cpu {
|
|||
if (b.use_power) {
|
||||
if (not b.power_now.empty()) {
|
||||
try {
|
||||
watts = (float)stoll(readfile(b.energy_now, "-1")) / 1000000.0;
|
||||
watts = (float)stoll(readfile(b.power_now, "-1")) / 1000000.0;
|
||||
}
|
||||
catch (const std::invalid_argument&) { }
|
||||
catch (const std::out_of_range&) { }
|
||||
|
|
Loading…
Reference in a new issue