src/linux_parser.cpp
// Todo: Read and return the system uptime
Read and return the system uptime
Read and return the system uptime
long unsigned LinuxParser::UpTime() { 
    string uptime_file = kProcDirectory + kUptimeFilename;
    long unsigned uptime_seconds;
    std::ifstream file = GetStream(uptime_file);
    file >> uptime_seconds;
    file.close();
    return uptime_seconds; 
}
long unsigned LinuxParser :: UpTime ( ) { string uptime_file = kProcDirectory + kUptimeFilename ; long unsigned uptime_seconds ; std :: ifstream file = GetStream ( uptime_file ) ; file >> uptime_seconds ; file . close ( ) ; return uptime_seconds ; }
Todo: Read and return the system uptime
Todo : Read and return the system uptime