Package com.google.inject.internal.util
Class ContinuousStopwatch
java.lang.Object
com.google.inject.internal.util.ContinuousStopwatch
A continuously timing stopwatch that is used for simple performance monitoring.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionContinuousStopwatch
(com.google.common.base.Stopwatch stopwatch) Constructs a ContinuousStopwatch, which will start timing immediately after construction. -
Method Summary
Modifier and TypeMethodDescriptionlong
reset()
Resets and returns elapsed time in milliseconds.void
resetAndLog
(String label) Resets and logs elapsed time in milliseconds.
-
Field Details
-
logger
-
stopwatch
private final com.google.common.base.Stopwatch stopwatch
-
-
Constructor Details
-
ContinuousStopwatch
public ContinuousStopwatch(com.google.common.base.Stopwatch stopwatch) Constructs a ContinuousStopwatch, which will start timing immediately after construction.- Parameters:
stopwatch
- the internal stopwatch used by ContinuousStopwatch
-
-
Method Details
-
reset
public long reset()Resets and returns elapsed time in milliseconds. -
resetAndLog
Resets and logs elapsed time in milliseconds.
-