mirror of
https://github.com/aristocratos/btop.git
synced 2024-09-29 22:51:35 +02:00
[macos] don't check /sys on macos
This commit is contained in:
parent
1b126f55e3
commit
2217cbe143
@ -73,7 +73,6 @@ namespace Cpu {
|
|||||||
vector<string> available_fields = {"total"};
|
vector<string> available_fields = {"total"};
|
||||||
vector<string> available_sensors = {"Auto"};
|
vector<string> available_sensors = {"Auto"};
|
||||||
cpu_info current_cpu;
|
cpu_info current_cpu;
|
||||||
fs::path freq_path = "/sys/devices/system/cpu/cpufreq/policy0/scaling_cur_freq";
|
|
||||||
bool got_sensors = false, cpu_temp_only = false;
|
bool got_sensors = false, cpu_temp_only = false;
|
||||||
int core_offset = 0;
|
int core_offset = 0;
|
||||||
|
|
||||||
@ -164,7 +163,6 @@ namespace Shared {
|
|||||||
arg_max = sysconf(_SC_ARG_MAX);
|
arg_max = sysconf(_SC_ARG_MAX);
|
||||||
|
|
||||||
//? Init for namespace Cpu
|
//? Init for namespace Cpu
|
||||||
if (not fs::exists(Cpu::freq_path) or access(Cpu::freq_path.c_str(), R_OK) == -1) Cpu::freq_path.clear();
|
|
||||||
Cpu::current_cpu.core_percent.insert(Cpu::current_cpu.core_percent.begin(), Shared::coreCount, {});
|
Cpu::current_cpu.core_percent.insert(Cpu::current_cpu.core_percent.begin(), Shared::coreCount, {});
|
||||||
Cpu::current_cpu.temp.insert(Cpu::current_cpu.temp.begin(), Shared::coreCount + 1, {});
|
Cpu::current_cpu.temp.insert(Cpu::current_cpu.temp.begin(), Shared::coreCount + 1, {});
|
||||||
Cpu::core_old_totals.insert(Cpu::core_old_totals.begin(), Shared::coreCount, 0);
|
Cpu::core_old_totals.insert(Cpu::core_old_totals.begin(), Shared::coreCount, 0);
|
||||||
|
Loading…
Reference in New Issue
Block a user