Starts the stopwatch. @return this Stopwatch instance @throws IllegalStateException if the stopwatch is already running.
()
| 146 | */ |
| 147 | |
| 148 | @CanIgnoreReturnValue |
| 149 | public Stopwatch start() { |
| 150 | checkState(!isRunning, "This stopwatch is already running."); |
| 151 | isRunning = true; |
| 152 | startTick = ticker.read(); |
| 153 | return this; |
| 154 | } |
| 155 | |
| 156 | /** |
| 157 | * Stops the stopwatch. Future reads will return the fixed duration that had elapsed up to this |
no test coverage detected