Texas Instruments interview question

Implement an alarm clock function