summaryrefslogtreecommitdiffstats
path: root/src/osx/btop_collect.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/osx/btop_collect.cpp')
-rw-r--r--src/osx/btop_collect.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/osx/btop_collect.cpp b/src/osx/btop_collect.cpp
index 68aa961..df1fca3 100644
--- a/src/osx/btop_collect.cpp
+++ b/src/osx/btop_collect.cpp
@@ -191,7 +191,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"};
@@ -407,8 +407,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;
@@ -447,7 +447,7 @@ namespace Cpu {
has_battery = false;
}
}
- return {percent, seconds, status};
+ return {percent, -1, seconds, status};
}
auto collect(bool no_update) -> cpu_info & {