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

Method elapsed

output/java_guava/1.4.19/Stopwatch.java:201–203  ·  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

199
200
201 public long elapsed(TimeUnit desiredUnit) {
202 return desiredUnit.convert(elapsedNanos(), NANOSECONDS);
203 }
204
205 /**
206 * Returns a string representation of the current elapsed time.

Callers 4

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

Calls 2

elapsedNanosMethod · 0.95
convertMethod · 0.45

Tested by

no test coverage detected