Overrides native global functions related to time allowing them to be controlled synchronously. This includes controlling:
setTimeout
clearTimeout
setInterval
clearInterval
Date
The clock starts at the Unix epoch (timestamp of 0). This means that when you instantiate new Date
in your application, it will have a time of January 1st, 1970
.
When I use fake timers: