Class ContinuousStopwatch

java.lang.Object
com.google.inject.internal.util.ContinuousStopwatch

@NotThreadSafe public final class ContinuousStopwatch extends Object
A continuously timing stopwatch that is used for simple performance monitoring.
Author:
crazybob@google.com (Bob Lee)
  • Constructor Summary

    Constructors
    Constructor
    Description
    ContinuousStopwatch(com.google.common.base.Stopwatch stopwatch)
    Constructs a ContinuousStopwatch, which will start timing immediately after construction.
  • Method Summary

    Modifier and Type
    Method
    Description
    long
    Resets and returns elapsed time in milliseconds.
    void
    Resets and logs elapsed time in milliseconds.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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

      public void resetAndLog(String label)
      Resets and logs elapsed time in milliseconds.