Update sysinfo to 0.28
This commit is contained in:
parent
d73ca4de0f
commit
df68cca0c9
2 changed files with 3 additions and 3 deletions
|
|
@ -65,5 +65,5 @@ version = "0.3"
|
|||
features = ["Document", "Window"]
|
||||
|
||||
[dependencies.sysinfo]
|
||||
version = "0.23"
|
||||
version = "0.28"
|
||||
optional = true
|
||||
|
|
|
|||
|
|
@ -16,11 +16,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"))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue