I think Bradgrafelman's implementation of pausing works like this:
When the timer first starts, you insert the current time into the start_time field.
Whenever it's paused, you calculate the time so far (current time minus the start_time field), add that to the value of the duration field, and put the result into duration. The first time it's paused, duration will be 0, but as it's paused again and again the duration will update.
When it's unpaused, insert the current time into start_time.
When it's finished, do the same thing, update the duration field to (current_time - start_time + duration), and you have the total time.