Stopwatch

Implement the stopwatch function