How can I create a timer that counts up and stops when reaching end of level?

This is a great tutorial by Devin Sherry on how to make a timer.