Microsoft interview question

Implement a timer in different ways