MCPcopy Create free account
hub / github.com/antlr/codebuff / elapsed

Method elapsed

corpus/java/training/guava/base/Stopwatch.java:183–185  ·  view source on GitHub ↗

Returns the current elapsed time shown on this stopwatch, expressed in the desired time unit, with any fraction rounded down. Note that the overhead of measurement can be more than a microsecond, so it is generally not useful to specify TimeUnit#NANOSECONDS precision here. @since 14.0 (

(TimeUnit desiredUnit)

Source from the content-addressed store, hash-verified

181 * @since 14.0 (since 10.0 as {@code elapsedTime()})
182 */
183 public long elapsed(TimeUnit desiredUnit) {
184 return desiredUnit.convert(elapsedNanos(), NANOSECONDS);
185 }
186
187 /**
188 * Returns a string representation of the current elapsed time.

Callers 4

loadAllMethod · 0.95
startupTimesMethod · 0.95
elapsedNanosMethod · 0.45
readMicrosMethod · 0.45

Calls 2

elapsedNanosMethod · 0.95
convertMethod · 0.45

Tested by

no test coverage detected