CodeCraft Technologies interview question

How to implement a Timer.