Merge branch 'master' into feature/software-renderer

This commit is contained in:
Héctor Ramón Jiménez 2023-03-07 07:24:34 +01:00
commit aa4b5bb6b9
No known key found for this signature in database
GPG key ID: 140CC052C94F138E
12 changed files with 45 additions and 82 deletions

View file

@ -15,11 +15,11 @@ pub fn fetch_information<Message>(
pub(crate) fn information(
graphics_info: compositor::Information,
) -> Information {
use sysinfo::{ProcessExt, ProcessorExt, System, SystemExt};
use sysinfo::{CpuExt, ProcessExt, System, SystemExt};
let mut system = System::new_all();
system.refresh_all();
let cpu = system.global_processor_info();
let cpu = system.global_cpu_info();
let memory_used = sysinfo::get_current_pid()
.and_then(|pid| system.process(pid).ok_or("Process not found"))