cooling/cooling.cc
/// return cpu temp in degrees C
///
return cpu temp in degrees C
return cpu temp in degrees C
double Cooling::get_cpu_temp()
{
  double ck = (-1000.0);
  fs::ifstream tztempf(m_temp_sensor_path,std::ifstream::in);
  if (tztempf.good()) {
    tztempf >> ck;
    tztempf.close();
    m_degc = (ck/1000.0);
    return m_degc;
  }
  tztempf.close();
  LOG_ERROR(Lgr) << "Failed to read temperature";
  return m_degc;                 
}
double Cooling :: get_cpu_temp ( ) { double ck = ( -1000.0 ) ; fs :: ifstream tztempf ( m_temp_sensor_path , std :: ifstream :: in ) ; if ( tztempf . good ( ) ) { tztempf >> ck ; tztempf . close ( ) ; m_degc = ( ck / 1000.0 ) ; return m_degc ; } tztempf . close ( ) ; LOG_ERROR ( Lgr ) << " " ; return m_degc ; }
return cpu temp in degrees C
return cpu temp in degrees C
// last temp