Add timer functionality to the event loop.