The Charnov Marginal Value Theorem (MVT) predicts the optimal foraging duration of animals exploiting patches of resources. The predictions of this model have been verified for various animal species. However, the model is based on several assumptions that are likely too simplistic. One of these assumptions is that animals are living forever (i.e., infinite horizon). Using a simple dynamic programming model, we tested the importance of this assumption by analysing the optimal strategy for time-limited foragers. We found that, for time-limited foragers, optimal patch residence times should be greater than those predicted from the classic, static MVT, and the deviation should increase when foragers are approaching the end of their life. These predictions were verified for females of the parasitoid Anaphes victus (Hymenoptera: Mymaridae) exploiting egg patches of its host, the carrot weevil Listronotus oregonensis (Coleoptera: Curculionidae). As predicted by the model, females indeed remained for a longer time on host patches when they approached the end of their life. Experimental results were finally analysed with a Cox regression model to identify the patch-leaving decision rules females used to behave according to the model's predictions.