Common intuition and experimental psychology suggest that the ability to self-regulate (willpower) is a depletable resource. We investigate the behavior of an agent with limited willpower who optimally consumes over time an endowment of a tempting and storable consumption good or cake. We assume that restraining consumption below the most tempting feasible rate requires willpower. Any willpower not used to regulate consumption may be valuable in controlling other urges. Willpower thus links otherwise unrelated behaviors requiring self-control. An agent with limited willpower will display apparent domain-specific time preference. Such an agent will almost never perfectly smooth his consumption, even when it is feasible to do so. Whether the agent relaxes control of his consumption over time as experimental psychologists predict or tightens it as most behavioral theories predict depends in our model on the net effect of two analytically distinct but opposing forces.