public final class CScheduler extends Object
Modifier and Type | Method and Description |
---|---|
static CScheduler |
get()
Returns the instance of singleton.
|
CSchedulerRegistration |
submit(Runnable task)
Schedules immediately a task, without any delay.
|
CSchedulerRegistration |
submit(Runnable task,
int delay)
Schedules a task with a constant delay.
|
public static CScheduler get()
public CSchedulerRegistration submit(Runnable task)
task
- the command to executepublic CSchedulerRegistration submit(Runnable task, int delay)
task
- the command to executedelay
- the amount of time to wait after one invocation ends before the next invocation