In another general aspect, the invention features a computer including a battery, means for charging the battery, means for detecting a temperature of at least one location within the computer, and means for reducing a charging rate of the means for charging when the temperature exceeds a reference value.