public final class UniformDistribution extends java.lang.Object implements DelayDistribution
That is, given a uniform distribution of 50 to 60 ms, there will be an equal spread of delays between 50 and 60. This would useful for representing an average delay of 55ms with a +/- 5ms jitter.
| Constructor and Description |
|---|
UniformDistribution(int lower,
int upper) |
| Modifier and Type | Method and Description |
|---|---|
long |
sampleMillis()
Samples a delay in milliseconds from the distribution.
|
public UniformDistribution(int lower,
int upper)
lower - lower bound inclusiveupper - upper bound inclusivepublic long sampleMillis()
DelayDistributionsampleMillis in interface DelayDistribution