Cognitive abilities enabling animals that feed on ephemeral but yearly renewable resources to infer
when
resources are available may have been favoured by natural selection, but the magnitude of the benefits brought by these abilities remains poorly known. Using computer simulations, we compared the efficiencies of three main types of foragers with different abilities to process temporal information, in spatially and/or temporally homogeneous or heterogeneous environments. One was endowed with a
sampling
memory, which stores recent experience about the availability of the different food types. The other two were endowed with a
chronological
or
associative
memory, which stores long-term temporal information about absolute times of these availabilities or delays between them, respectively. To determine the range of possible efficiencies, we also simulated a forager without temporal cognition but which simply targeted the closest and possibly empty food sources, and a perfectly prescient forager, able to know at any time which food source was effectively providing food. The
sampling
,
associative
and
chronological
foragers were far more efficient than the forager without temporal cognition in temporally predictable environments, and interestingly, their efficiencies increased with the level of temporal heterogeneity. The use of a long-term temporal memory results in a foraging efficiency up to 1.16 times better (
chronological
memory) or 1.14 times worse (
associative
memory) than the use of a simple
sampling
memory. Our results thus show that, for everyday foraging, a long-term temporal memory did not provide a clear benefit over a simple short-term memory that keeps track of the current resource availability. Long-term temporal memories may therefore have emerged in contexts where short-term temporal cognition is useless, i.e. when the anticipation of future environmental changes is strongly needed.