Implemented a timer.