The schedule method of the TaskManager Class contains the following signatures:
schedule(Runnable runnable)
schedule(Runnable runnable, long when)
schedule(Runnable runnable, long when, boolean lightweight)
Schedules a runnable object to run immediately.
public int schedule(Runnable runnable);
Returns a non-zero integer that identifies the task.
runnable | The object that is run. |
Schedules a runnable object to run at a specified time.
public int schedule(Runnable runnable, long when);
Returns a non-zero integer that identifies the task.
runnable | The object that is run. |
long | The time at which the object is to start. |
Schedules a runnable object to run at a specified time.
public synchronized int schedule(Runnable runnable, long when, boolean lightweight);
Returns a non-zero integer that identifies the task.
runnable | The object that is run. |
when | The time at which the object is run. |
lightweight | Set to true to run the task as a lightweight task. |