| Modifier and Type | Class and Description |
|---|---|
static class |
CTimer.Status
Enumerates the possible status of the timer.
|
| Constructor and Description |
|---|
CTimer(Runnable task,
int interval)
Creates the timer with a
Runnable to be executed repeatedly and the time, in milliseconds (thousands of a second), the timer should delay in between executions of
the task. |
| Modifier and Type | Method and Description |
|---|---|
int |
getInterval()
Returns the time, in milliseconds (thousands of a second), the timer should delay in between executions of the specified task.
|
CTimer.Status |
getStatus()
Returns the status of the timer.
|
void |
start()
Starts the timer which executes repeatedly calls.
|
void |
start(int interval)
Starts the timer which executes repeatedly calls, setting the time, in milliseconds (thousands of a second), the timer should delay in between executions of the specified
task.
The time will override the previous interval time. |
void |
stop()
Stops the timer which is currently running.
|
public CTimer(Runnable task, int interval)
Runnable to be executed repeatedly and the time, in milliseconds (thousands of a second), the timer should delay in between executions of
the task.task - the task to be executed repeatedlyinterval - the time, in milliseconds (thousands of a second), the timer should delay in between executions of the specified task.public int getInterval()
public CTimer.Status getStatus()
public void start(int interval)
interval - the time, in milliseconds (thousands of a second), the timer should delay in between executions of the specified task.public void start()
public void stop()