Function mprober_lib::process::get_process_time_stat[][src]

pub fn get_process_time_stat(pid: u32) -> Result<ProcessTimeStat, ScannerError>

Get the time stat of a specific process found by ID by reading the /proc/PID/stat file.

extern crate mprober_lib;

use mprober_lib::process;

let process_time_stat = process::get_process_time_stat(1).unwrap();

println!("{:#?}", process_time_stat);