Ok Now: public float basicTimeUnit;
public float baseFactor;
public float factorProgressTarget;
public int currentExponent;
public int exponentLimit;
public long nextConnectTime;
public double waitTime;
then the method would be :
public void setNextConnect() throws TimeExceededException
{
float progressEachIteration=(baseFactor-factorProgressTarget)/exponentLimit
float progressedFactor=baseFactor-(progressEachIteration*currentExponent);
waitTime *= progressedFactor;
nextConnectTime += (long)waitTime
} |