Package com.epicbot.api.shared.util.time
Class SleepTimer
- java.lang.Object
-
- com.epicbot.api.shared.util.time.Timer
-
- com.epicbot.api.shared.util.time.SleepTimer
-
- All Implemented Interfaces:
Completable
,Completion
public abstract class SleepTimer extends Timer implements Completable, Completion
-
-
Constructor Summary
Constructors Constructor Description SleepTimer(int period)
SleepTimer(int min, int max)
SleepTimer(long period)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
complete()
Called on successful completion.void
run()
Called every iteration and called beforeCompletable.isDone()
so it runs atleast once.boolean
sleep()
boolean
sleep(int iteration)
-
Methods inherited from class com.epicbot.api.shared.util.time.Timer
getElapsed, getRemaining, isRunning, reset, setEndIn, stop, toElapsedString, toRemainingString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.epicbot.api.shared.util.details.Completable
isDone
-
-
-
-
Method Detail
-
complete
public void complete()
Called on successful completion.- Specified by:
complete
in interfaceCompletion
-
run
public void run()
Called every iteration and called beforeCompletable.isDone()
so it runs atleast once.
-
sleep
public boolean sleep()
-
sleep
public boolean sleep(int iteration)
-
-