Make stopwatch function