public abstract class SleepTimer extends Timer implements Completable, Completion
Constructor and Description |
---|
SleepTimer(int period) |
SleepTimer(int min,
int max) |
SleepTimer(long period) |
Modifier and Type | Method and Description |
---|---|
void |
complete()
Called on successful completion.
|
void |
run()
Called every iteration and called before
Completable.isDone() so it runs atleast once. |
boolean |
sleep() |
boolean |
sleep(int iteration) |
getElapsed, getRemaining, isRunning, reset, setEndIn, stop, toElapsedString, toRemainingString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
isDone
public SleepTimer(int min, int max)
public SleepTimer(int period)
public SleepTimer(long period)
public void complete()
complete
in interface Completion
public void run()
Completable.isDone()
so it runs atleast once.public boolean sleep()
public boolean sleep(int iteration)