src/linux_parser.cpp
long LinuxParser::UpTime() {  
  long up_Time;
  string line;
  std::ifstream stream(kProcDirectory+kUptimeFilename);
  if(stream.is_open()) {
    std::getline(stream,line);
    std::istringstream linestream(line);
    linestream>>up_Time;
  return up_Time;
  }
  else
    return 0;
  }
// TODO: Read and return the system uptime
Read and return the system uptime
Read and return the system uptime
long LinuxParser::UpTime() {  
  long up_Time;
  string line;
  std::ifstream stream(kProcDirectory+kUptimeFilename);
  if(stream.is_open()) {
    std::getline(stream,line);
    std::istringstream linestream(line);
    linestream>>up_Time;
  return up_Time;
  }
  else
    return 0;
  }
long LinuxParser :: UpTime ( ) { long up_Time ; string line ; std :: ifstream stream ( kProcDirectory + kUptimeFilename ) ; if ( stream . is_open ( ) ) { std :: getline ( stream , line ) ; std :: istringstream linestream ( line ) ; linestream >> up_Time ; return up_Time ; } else return 0 ; }
TODO: Read and return the system uptime
TODO : Read and return the system uptime