Class 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 Detail

      • 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 Detail

      • reset

        public long reset()
        Resets and returns elapsed time in milliseconds.
      • resetAndLog

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