Function getrusage
pub unsafe fn getrusage(who: i32, usage: &mut rusage_t) -> Result<(), i32> ⓘ
Available on crate feature
dep_nc
only.Expand description
Get resource usage.
§Examples
let mut usage = nc::rusage_t::default();
let ret = unsafe { nc::getrusage(nc::RUSAGE_SELF, &mut usage) };
assert!(ret.is_ok());
assert!(usage.ru_maxrss > 0);
assert_eq!(usage.ru_nswap, 0);