Starts the stopwatch. @return this {@code Stopwatch} instance @throws IllegalStateException if the stopwatch is already running.
()
| 161 | * @throws IllegalStateException if the stopwatch is already running. |
| 162 | */ |
| 163 | @CanIgnoreReturnValue |
| 164 | public Stopwatch start() { |
| 165 | checkState(!isRunning, "This stopwatch is already running."); |
| 166 | isRunning = true; |
| 167 | startTick = ticker.read(); |
| 168 | return this; |
| 169 | } |
| 170 | |
| 171 | /** |
| 172 | * Stops the stopwatch. Future reads will return the fixed duration that had elapsed up to this |