Systems harvesting energy from a stochastic source have been widely studied in the literature. However, we are not aware of any work that deals with the time it takes for a battery to recharge up to a given level, when the energy source is discrete stochastic. This letter aims to examine the recharge time of a perfect battery. We examine the cases when the energy arrival is a Poisson process, and more generally, a renewal process. We obtain formulas for the distribution of the recharge time as well as the expected value of the recharge time. Using these, we find the switching time of the system, which is then applied to the design of a harvest-then-transmit protocol for green communications. Monte-Carlo simulations verify the obtained formulas.