Code example for ScheduledThreadPoolExecutor

Methods: schedule

0
		return taskFuture;
	} 
 
	public static Future<?> registerDelayedTask(Runnable task, int delay,
			TimeUnit unit) {
		return TaskManager.scheduledExecutor.schedule(task, delay, unit);
	} 
 
	public static Future<?> scheduleTask(Runnable task, int delay, int rate,
			TimeUnit unit) {
		return TaskManager.scheduledExecutor.scheduleWithFixedDelay(task,
				delay, rate, unit);
	} 
 
} 
Connect your IDE to all the code out there  Get Codota for Java