“Anticipating events that will happen in the future is among the most important functions the brain performs. Indeed, it has been increasingly stressed that learning and memory are prospective brain functions; that is, they are only adaptive to the extent that they help animals anticipate and prepare for the future (Dudai and Carruthers, 2005; Schacter and Addis, 2007). To anticipate when events will happen, the brain has evolved mechanisms to tell time across a wide range of temporal scales.”
Source: Differential Encoding of Time by Prefrontal and Striatal Network Dynamics Journal of Neuroscience 25 January 2017, 37 (4) 854-870
However, the neural mechanisms underlying the perception of time, either on short scales (seconds) or long scales (days / weeks), remain unknown.
Further reading : The neural basis of temporal processing Annu. Rev. Neurosci. 2004. 27:307–40