ScheduledFuture<?> schedule(Runnable command, long delay, TimeUnit unit)
Creates and background executes a one-shot action that becomes enabled after the given delay.
Parameters
Name | Description |
command | The task to execute. |
delay | The time from now to delay execution. |
unit | The time unit of the delay parameter. |
Return
A ScheduledFuture representing pending completion of the task, and whose get() method will return null upon completion.