Thermodynamics and temperature measurements