public class Repeater
extends java.lang.Object
StopWatch
instead.Modifier and Type | Class and Description |
---|---|
static interface |
Repeater.RepeatListener |
Constructor and Description |
---|
Repeater() |
Repeater(boolean processOnStartingThread) |
Repeater(android.os.Handler handler) |
Modifier and Type | Method and Description |
---|---|
int |
getRepeaterDelay()
Retrieves the amount of time between method invocation.
|
boolean |
isRunning()
Determines if the Repeater is currently running
|
void |
setRepeaterDelay(int milliSeconds)
Sets the amount of time between method invocation.
|
void |
setRepeatListener(Repeater.RepeatListener listener)
Sets the listener to be notified for each repeat
|
void |
start()
Starts the repeater
|
void |
stop()
Stops the repeater
|
public Repeater()
public Repeater(boolean processOnStartingThread)
processOnStartingThread
- True if the repeating process should be handled on the same thread that created the Repeaterpublic Repeater(android.os.Handler handler)
handler
- The Handler to use for the repeating processpublic void setRepeaterDelay(int milliSeconds)
milliSeconds
- The time between method calls [default: ]public int getRepeaterDelay()
public void start()
public void stop()
public boolean isRunning()
public void setRepeatListener(Repeater.RepeatListener listener)
listener
- The listener or null