src/process.cpp
// TODO: Return this process's CPU utilization
Return this process's CPU utilization
Return this process ' s CPU utilization
float Process::CpuUtilization() const 
{
    long uptime = LinuxParser::UpTime();
    long starttime = LinuxParser::UpTime(pid_);
    long seconds = uptime - starttime;
    long active_jiffies = LinuxParser::ActiveJiffies(pid_);
    return (float)active_jiffies/sysconf(_SC_CLK_TCK)/seconds;
}
float Process :: CpuUtilization ( ) const { long uptime = LinuxParser :: UpTime ( ) ; long starttime = LinuxParser :: UpTime ( pid_ ) ; long seconds = uptime - starttime ; long active_jiffies = LinuxParser :: ActiveJiffies ( pid_ ) ; return ( float ) active_jiffies / sysconf ( _SC_CLK_TCK ) / seconds ; }
TODO: Return this process's CPU utilization
TODO : Return this process ' s CPU utilization