mirror of
https://github.com/aristocratos/btop.git
synced 2024-05-18 11:22:46 +12:00
make os compatible
This commit is contained in:
parent
a81b514d6d
commit
0c706cd20a
|
@ -187,7 +187,7 @@ namespace Cpu {
|
|||
string cpuHz;
|
||||
bool has_battery = true;
|
||||
bool macM1 = false;
|
||||
tuple<int, long, string> current_bat;
|
||||
tuple<int, float, long, string> current_bat;
|
||||
|
||||
const array<string, 10> time_names = {"user", "nice", "system", "idle"};
|
||||
|
||||
|
@ -398,8 +398,8 @@ namespace Cpu {
|
|||
~IOPSList_Wrap() { CFRelease(data); }
|
||||
};
|
||||
|
||||
auto get_battery() -> tuple<int, long, string> {
|
||||
if (not has_battery) return {0, 0, ""};
|
||||
auto get_battery() -> tuple<int, float, long, string> {
|
||||
if (not has_battery) return {0, 0, 0, ""};
|
||||
|
||||
uint32_t percent = -1;
|
||||
long seconds = -1;
|
||||
|
@ -438,7 +438,7 @@ namespace Cpu {
|
|||
has_battery = false;
|
||||
}
|
||||
}
|
||||
return {percent, seconds, status};
|
||||
return {percent, -1, seconds, status};
|
||||
}
|
||||
|
||||
auto collect(bool no_update) -> cpu_info & {
|
||||
|
|
Loading…
Reference in a new issue