We address the problem of deciding when to spin down the disk of a mobile computer in order to extend battery life. One of the most critical resources in mobile computing environments is battery life, and good energy conservation methods increase the utility of mobile systems. We use a simple and efficient algorithm based on machine learning techniques that has excellent performance. Using trace data, the algorithm outperforms several methods that are theoretically optimal under various worst-case assumptions, as well as the best fixed time-out strategy. In particular, the algorithm reduces the power consumption of the disk to about half of the energy consumed by a one minute fixed time-out policy. Furthermore, the algorithm uses as little as 88% of the energy consumed by the best fixed time-out computed in retrospect.