MCPcopy
hub / github.com/google/guava / stop

Method stop

guava/src/com/google/common/base/Stopwatch.java:178–185  ·  view source on GitHub ↗

Stops the stopwatch. Future reads will return the fixed duration that had elapsed up to this point. @return this {@code Stopwatch} instance @throws IllegalStateException if the stopwatch is already stopped.

()

Source from the content-addressed store, hash-verified

176 * @throws IllegalStateException if the stopwatch is already stopped.
177 */
178 @CanIgnoreReturnValue
179 public Stopwatch stop() {
180 long tick = ticker.read();
181 checkState(isRunning, "This stopwatch is already stopped.");
182 isRunning = false;
183 elapsedNanos += tick - startTick;
184 return this;
185 }
186
187 /**
188 * Sets the elapsed time for this stopwatch to zero, and places it in a stopped state.

Callers 2

loadAllMethod · 0.95
transitionServiceMethod · 0.95

Calls 2

readMethod · 0.45
checkStateMethod · 0.45

Tested by

no test coverage detected