Top Description Fields Constructors Methods
com.google.inject.internal.util

public final Class ContinuousStopwatch

extends Object
Class Inheritance
Annotations
@NotThreadSafe
Static Imports
java.util.concurrent.TimeUnit.MILLISECONDS

A continuously timing stopwatch that is used for simple performance monitoring.
Author
[email protected] (Bob Lee)

Field Summary

Modifier and TypeField and Description
private final Logger
private final Stopwatch

Constructor Summary

AccessConstructor and Description
public
ContinuousStopwatch(Stopwatch
the internal stopwatch used by ContinuousStopwatch
stopwatch
)

Constructs a ContinuousStopwatch, which will start timing immediately after construction.

Method Summary

Modifier and TypeMethod and Description
public long
reset()

Resets and returns elapsed time in milliseconds.

public void
resetAndLog(String label)

Resets and logs elapsed time in milliseconds.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

loggerback to summary
private final Logger logger
stopwatchback to summary
private final Stopwatch stopwatch

Constructor Detail

ContinuousStopwatchback to summary
public ContinuousStopwatch(Stopwatch stopwatch)

Constructs a ContinuousStopwatch, which will start timing immediately after construction.

Parameters
stopwatch:Stopwatch

the internal stopwatch used by ContinuousStopwatch

Method Detail

resetback to summary
public long reset()

Resets and returns elapsed time in milliseconds.

resetAndLogback to summary
public void resetAndLog(String label)

Resets and logs elapsed time in milliseconds.