The only part that would be an exercise left to the student is figuring out how much time is left in the current activity when OH comes back up. The code above will restart the activity but do it for the full amount of time, not just the amount of time that might be left. (e.g. if OH went down 20 minutes into your 30 minutes at 30c it would restart the timer on that activity for a total of 50 minutes).