src/linux_parser.cpp
// TODO: Read and return the number of active jiffies for the system
Read and return the number of active jiffies for the system
Read and return the number of active jiffies for the system
long LinuxParser::ActiveJiffies() {
  string line, cpu;
  long usrjf;
  std::ifstream istream(kProcDirectory + kStatFilename);
  if (istream.is_open()) {
    std::getline(istream, line);
    std::istringstream linestream(line);
    linestream >> cpu >> usrjf;
    return usrjf;
  }
  return 0;
}
long LinuxParser :: ActiveJiffies ( ) { string line , cpu ; long usrjf ; std :: ifstream istream ( kProcDirectory + kStatFilename ) ; if ( istream . is_open ( ) ) { std :: getline ( istream , line ) ; std :: istringstream linestream ( line ) ; linestream >> cpu >> usrjf ; return usrjf ; } return 0 ; }
TODO: Read and return the number of active jiffies for the system
TODO : Read and return the number of active jiffies for the system