Qualcomm interview question

implement a routine to control timers.