How do I code a timer to count down to 2 minutes after inactivity?

P.S. keeping resource usage low is the goal here?