This is a nice and simple timer using scoreboard tehnology.
When you want to activate the timer,just place a redstone block next to the repeating command block (the purple one).
Again, when you want to activate the timer reset,just place a redstone block next to the impulse command block (the orange one).
Have a nice day and have fun coding! ;)
Lol,i forgot how to show the timer: /scoreboard objective setdisplay sidebar Timer