bg: cpu online...

Can turn them on and off in real time on some systems..
This commit is contained in:
Alastair Poole 2021-03-31 16:12:24 +01:00
parent a6694b4c9a
commit cce798aea5
1 changed files with 2 additions and 1 deletions

View File

@ -39,6 +39,7 @@ _background_poller_cb(void *data, Ecore_Thread *thread)
system_memory_usage_get(&memory);
ui->mem_total = memory.total;
ui->mem_used = memory.used;
while (!ecore_thread_check(thread))
{
@ -58,7 +59,7 @@ _background_poller_cb(void *data, Ecore_Thread *thread)
if (file_system_in_use("ZFS"))
ui->mem_used += memory.zfs_arc_used;
ui->cpu_usage = percent / ncpu;
ui->cpu_usage = percent / system_cpu_online_count_get();
}
}