Package net.pl3x.map.core.scheduler
Class Scheduler
java.lang.Object
net.pl3x.map.core.scheduler.Scheduler
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdd task to the scheduler.voidAdd task to the scheduler.voidAdd task to the scheduler.voidCancel all scheduled tasks.voidtick()Tick this scheduler once every second.
-
Constructor Details
-
Scheduler
public Scheduler()
-
-
Method Details
-
tick
public void tick()Tick this scheduler once every second. -
cancelAll
public void cancelAll()Cancel all scheduled tasks. -
addTask
Add task to the scheduler.- Parameters:
task- Task to add
-
addTask
Add task to the scheduler.- Parameters:
delay- Delay (in seconds) before task startsrunnable- Task to add
-
addTask
Add task to the scheduler.- Parameters:
delay- Delay (in seconds) before task startsrepeat- Delay (in seconds) before task repeatsrunnable- Task to add
-