simulator/src/main/java/com/hazelcast/simulator/utils/CommonUtils.java
public static void sleepRandomNanos(Random random, long maxDelayNanos) {
        if (maxDelayNanos <= 0) {
            return;
        }
        long randomValue = Math.abs(random.nextLong() + 1);
        sleepNanos(randomValue % maxDelayNanos);
    }
public static void sleepRandomNanos(Random random, long maxDelayNanos) {
        if (maxDelayNanos <= 0) {
            return;
        }
        long randomValue = Math.abs(random.nextLong() + 1);
        sleepNanos(randomValue % maxDelayNanos);
    }
public static void sleepRandomNanos ( Random random , long maxDelayNanos ) { if ( maxDelayNanos <= 0 ) { return ; } long randomValue = Math . abs ( random . nextLong ( ) + 1 ) ; sleepNanos ( randomValue % maxDelayNanos ) ; }
Sleeps a random amount of time.
<p>
The call is ignored if maxDelayNanos equals or smaller than zero.

@param random        the Random used to randomize
@param maxDelayNanos the maximum sleeping period in nanoseconds
Sleeps a random amount of time . <p > The call is ignored if maxDelayNanos equals or smaller than zero .