Add stopwatch implementation and factory method