com.clarkware.junitperf
Class RandomTimer

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

public class RandomTimer
extends java.lang.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:
Timer

Constructor Summary
RandomTimer(long delay, double variation)
          Constructs a RandomTimer with the specified minimum delay and variation.
 
Method Summary
 long getDelay()
          Returns the timer delay.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

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 Detail

getDelay

public long getDelay()
Returns the timer delay.

Specified by:
getDelay in interface Timer
Returns:
Delay (ms).


Copyright ? 1999-2005 Clarkware Consulting, Inc.