com.flexiblewebsolutions.xdriveunit
Class DelayTimer

java.lang.Object
  extended by com.flexiblewebsolutions.xdriveunit.DelayTimer

public class DelayTimer
extends java.lang.Object

Sets a delay for any action to be performed.

Author:
Donavon Buss

Constructor Summary
DelayTimer()
           
 
Method Summary
 void clickDelay()
          Suspends operation of thread for a specified amount of time.
 long getDelay()
          The number of milliseconds set as the delay
 boolean getRandomDelay()
          Returns whether the delay is random
 int getRandomMax()
          Returns max possible value for random generation
 int getRandomMin()
          Returns min possible value for random generation
 void setDelaySeconds(int pSeconds)
          Set number of seconds to delay for non-random mode
 void setRandomDelay(boolean pVal)
          Sets the delay time to use a random value
 void setRandomDelay(boolean pVal, int pMin, int pMax)
          Sets the delay time to use a random value within a range
 void setRandomMax(int randomMax)
          Sets the max possible value for random generation
 void setRandomMin(int randomMin)
          Sets the minimum possible value for random generation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DelayTimer

public DelayTimer()
Method Detail

setRandomDelay

public void setRandomDelay(boolean pVal)
Sets the delay time to use a random value

Parameters:
pVal - True value set random delay mode

setRandomDelay

public void setRandomDelay(boolean pVal,
                           int pMin,
                           int pMax)
Sets the delay time to use a random value within a range

Parameters:
pVal - True value set random delay mode
pMin - Minimum value for delay
pMax - Maximum value for delay

getRandomDelay

public boolean getRandomDelay()
Returns whether the delay is random

Returns:
true if random delay

clickDelay

public void clickDelay()
Suspends operation of thread for a specified amount of time.


getDelay

public long getDelay()
The number of milliseconds set as the delay

Returns:
millisecond delay

setDelaySeconds

public void setDelaySeconds(int pSeconds)
Set number of seconds to delay for non-random mode

Parameters:
Current - seconds setting

getRandomMax

public int getRandomMax()
Returns max possible value for random generation

Returns:
Maximum possible seconds

setRandomMax

public void setRandomMax(int randomMax)
Sets the max possible value for random generation

Parameters:
Maximum - possible seconds.

getRandomMin

public int getRandomMin()
Returns min possible value for random generation

Returns:
Minimum possible seconds

setRandomMin

public void setRandomMin(int randomMin)
Sets the minimum possible value for random generation

Parameters:
Minimum - possible seconds


Copyright © -2005 . All Rights Reserved.