ScheduledExecutorService.schedule

Submits a one-shot task that becomes enabled after the given delay.

@param command the task to execute @param delay the time from now to delay execution @param unit the time unit of the delay parameter @return a ScheduledFuture representing pending completion of the task and whose {@code get()} method will return {@code null} upon completion @throws RejectedExecutionException if the task cannot be scheduled for execution @throws NullPointerException if command or unit is null

interface ScheduledExecutorService
schedule
(
Runnable command
,
Duration delay
)

Meta