| Modifier and Type | Class and Description |
|---|---|
| public abstract static class | Timer.
Runnable that can be scheduled on a |
| pack-priv static class | Timer.
Manages a single thread for updating timers. |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv long | |
| pack-priv final Array | |
| pack-priv static Timer. | |
| pack-priv static final Object |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public synchronized void | |
| public static Timer | |
| public synchronized boolean | |
| public static Timer. | |
| public Timer. | |
| public static Timer. | |
| public static Timer. | |
| public static Timer. | |
| public Timer. | scheduleTask(Timer.
Schedules a task to occur once after the specified delay. |
| public Timer. | scheduleTask(Timer.
Schedules a task to occur once after the specified delay and then repeatedly at the specified interval until cancelled. |
| public Timer. | scheduleTask(Timer.
If negative, the task will repeat forever. repeatCount)Schedules a task to occur once after the specified delay and then a number of additional times at the specified interval. |
| public void | |
| public void | |
| pack-priv static Timer. | |
| pack-priv synchronized long |
| stopTimeMillis | back to summary |
|---|---|
| pack-priv long stopTimeMillis | |
| tasks | back to summary |
|---|---|
| pack-priv final Array<Timer. | |
| thread | back to summary |
|---|---|
| pack-priv static Timer. | |
| threadLock | back to summary |
|---|---|
| pack-priv static final Object threadLock | |
| Timer | back to summary |
|---|---|
| public Timer() | |
| clear | back to summary |
|---|---|
| public void clear() Cancels all tasks. | |
| delay | back to summary |
|---|---|
| public synchronized void delay(long delayMillis) Adds the specified delay to all tasks. | |
| instance | back to summary |
|---|---|
| public static Timer instance() Timer instance singleton for general application wide usage. Static methods on | |
| isEmpty | back to summary |
|---|---|
| public synchronized boolean isEmpty() Returns true if the timer has no tasks in the queue. Note that this can change at any time. Synchronize on the timer instance to prevent tasks being added, removed, or updated. | |
| post | back to summary |
|---|---|
| public static Timer. Schedules a task on
| |
| postTask | back to summary |
|---|---|
| public Timer. Schedules a task to occur once as soon as possible, but not sooner than the start of the next frame. | |
| schedule | back to summary |
|---|---|
| public static Timer. Schedules a task on
| |
| schedule | back to summary |
|---|---|
| public static Timer. Schedules a task on
| |
| schedule | back to summary |
|---|---|
| public static Timer. Schedules a task on | |
| scheduleTask | back to summary |
|---|---|
| public Timer. Schedules a task to occur once after the specified delay. | |
| scheduleTask | back to summary |
|---|---|
| public Timer. Schedules a task to occur once after the specified delay and then repeatedly at the specified interval until cancelled. | |
| scheduleTask | back to summary |
|---|---|
| public Timer. Schedules a task to occur once after the specified delay and then a number of additional times at the specified interval.
| |
| start | back to summary |
|---|---|
| public void start() Starts the timer if it was stopped. Tasks are delayed by the time passed while stopped. | |
| stop | back to summary |
|---|---|
| public void stop() Stops the timer if it was started. Tasks will not be executed while stopped. | |
| thread | back to summary |
|---|---|
| pack-priv static Timer. | |
| update | back to summary |
|---|---|
| pack-priv synchronized long update(Timer. | |
Timer.
| Modifier and Type | Field and Description |
|---|---|
| pack-priv final Application | |
| pack-priv long | |
| pack-priv long | |
| pack-priv int | |
| pack-priv volatile Timer |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public synchronized long | |
| public boolean | |
| pack-priv synchronized void | |
| public abstract void | run()
Redeclares java. If this is the last time the task will be ran or the task is first cancelled, it may be scheduled again in this method. |
| app | back to summary |
|---|---|
| pack-priv final Application app | |
| executeTimeMillis | back to summary |
|---|---|
| pack-priv long executeTimeMillis | |
| intervalMillis | back to summary |
|---|---|
| pack-priv long intervalMillis | |
| repeatCount | back to summary |
|---|---|
| pack-priv int repeatCount | |
| timer | back to summary |
|---|---|
| pack-priv volatile Timer timer | |
| Task | back to summary |
|---|---|
| public Task() | |
| cancel | back to summary |
|---|---|
| public void cancel() Cancels the task. It will not be executed until it is scheduled again. This method can be called at any time. | |
| getExecuteTimeMillis | back to summary |
|---|---|
| public synchronized long getExecuteTimeMillis() Returns the time in milliseconds when this task will be executed next. | |
| isScheduled | back to summary |
|---|---|
| public boolean isScheduled() Returns true if this task is scheduled to be executed in the future by a timer. The execution time may be reached at any time after calling this method, which may change the scheduled state. To prevent the scheduled state from changing, synchronize on this task object, eg:
synchronized (task) {
if (!task.isScheduled()) { ... }
}
| |
| reset | back to summary |
|---|---|
| pack-priv synchronized void reset() | |
| run | back to summary |
|---|---|
| public abstract void run() Redeclares java. If this is the last time the task will be ran or the task is first cancelled, it may be scheduled again in this method. | |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv final Application | |
| pack-priv final Files | |
| pack-priv Timer | |
| pack-priv final Array | |
| pack-priv long | |
| pack-priv final Array | |
| private final Runnable | |
| pack-priv final Array |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv void | |
| public void | dispose()
Implements com. Called when the |
| public void | pause()
Implements com. Called when the |
| pack-priv void | |
| public void | resume()
Implements com. Called when the Application is about to be resumed |
| public void | |
| pack-priv void |
| app | back to summary |
|---|---|
| pack-priv final Application app | |
| files | back to summary |
|---|---|
| pack-priv final Files files | |
| instance | back to summary |
|---|---|
| pack-priv Timer instance | |
| instances | back to summary |
|---|---|
| pack-priv final Array<Timer> instances | |
| pauseTimeMillis | back to summary |
|---|---|
| pack-priv long pauseTimeMillis | |
| postedTasks | back to summary |
|---|---|
| pack-priv final Array<Timer. | |
| runPostedTasks | back to summary |
|---|---|
| private final Runnable runPostedTasks | |
| runTasks | back to summary |
|---|---|
| pack-priv final Array<Timer. | |
| TimerThread | back to summary |
|---|---|
| public TimerThread() | |
| addPostedTask | back to summary |
|---|---|
| pack-priv void addPostedTask(Timer. | |
| dispose | back to summary |
|---|---|
| public void dispose() Implements com. Doc from com. Called when the | |
| pause | back to summary |
|---|---|
| public void pause() Implements com. Doc from com. Called when the | |
| removePostedTask | back to summary |
|---|---|
| pack-priv void removePostedTask(Timer. | |
| resume | back to summary |
|---|---|
| public void resume() Implements com. Doc from com. Called when the Application is about to be resumed | |
| run | back to summary |
|---|---|
| public void run() Implements java. Doc from java. Runs this operation. | |
| runPostedTasks | back to summary |
|---|---|
| pack-priv void runPostedTasks() | |