Ciena interview question

How would you code a watchdog timer?