long numberOfMessages = _command.getNumberOfMessages();
long maximumDuration = _command.getMaximumDuration();
if (maximumDuration == 0 && numberOfMessages == 0)
{
throw new DistributedTestException("number of messages and duration cannot both be zero");
}
long duration = maximumDuration - _command.getStartDelay();
if (maximumDuration > 0 && duration <= 0)
{
throw new DistributedTestException("Start delay must be less than maximum test duration");
}
final long requiredDuration = duration > 0 ? duration : 0;
doSleepForStartDelay();