Implemented timer functionality.