|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.planeth.common.timing.WaitTimer
WaitTimer implementation
The difference to a Timer is as follow:
A WaitTimer hasn't any relation to a Thread.
The isWaitPeriodOver method returns false until the waiting period is over, that's all.
It's similar to a backward running stopwatch with the difference, that you can
define the number of wait periods (1 to INFINITE_PERIODS) to be completed.
It can also be uses as a controller for a toggling action.
The min waitTime is 10 millis.
Timer,
TimerManager| Field Summary | |
static int |
MINIMUM_WAIT_TIME
|
| Constructor Summary | |
WaitTimer(int waitMillis)
Constructor for WaitTimer. |
|
WaitTimer(int waitMillis,
int numberOfPeriods)
Constructor for WaitTimer. |
|
| Method Summary | |
boolean |
getTogglingFlag()
Returns the toggling flag. |
boolean |
isWaitPeriodOver()
Returns true, if the defined waitMillis are over. |
void |
pause(boolean pauseState)
Pauses/unpauses the WaitTimer |
void |
restart()
Restarts the WaitTimer with the defined number of wait periods |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int MINIMUM_WAIT_TIME
| Constructor Detail |
public WaitTimer(int waitMillis)
waitMillis - the main wait time in millis
public WaitTimer(int waitMillis,
int numberOfPeriods)
waitMillis - the main wait time in millisnumberOfPeriods - the number of wait periods to be completed until the WaitTimer ends| Method Detail |
public boolean isWaitPeriodOver()
public boolean getTogglingFlag()
public void restart()
public void pause(boolean pauseState)
pause in interface ITimeControllablepauseState - ITimeControllable.pause(boolean)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||