Google interview question

Design and code a timer.