referrerpolicy=no-referrer-when-downgrade

get_total_cpu_usage

Function get_total_cpu_usage 

Source
pub fn get_total_cpu_usage(rusage: Usage) -> Duration
Expand description

Calculate the total CPU time from the given usage structure, returned from [nix::sys::resource::getrusage], and calculates the total CPU time spent, including both user and system time.

§Arguments

  • rusage: Contains resource usage information.

§Returns

Returns a Duration representing the total CPU time.