Class RandomTimer

java.lang.Object
com.clarkware.junitperf.RandomTimer
All Implemented Interfaces:
Timer

public class RandomTimer extends Object implements Timer
The RandomTimer is a Timer with a random delay and a uniformly distributed variation.
Author:
Mike Clark, Clarkware Consulting, Inc.
See Also:
  • Constructor Details

    • RandomTimer

      public RandomTimer(long delay, double variation)
      Constructs a RandomTimer with the specified minimum delay and variation.
      Parameters:
      delay - Minimum delay (ms).
      variation - Variation (ms).
  • Method Details

    • getDelay

      public long getDelay()
      Returns the timer delay.
      Specified by:
      getDelay in interface Timer
      Returns:
      Delay (ms).