Thermal evolution of compact objects and relaxation time