protected Future<?> scheduleRecurring(Runnable work, TaskType type, long initial_delay, long delay, TimeUnit unit, boolean can_block) { return doSchedule(new RecurringTask(work, type, initial_delay, delay, unit, can_block), initial_delay); }
public void execute(Runnable task, boolean can_block) { submitToPool(task instanceof TimeScheduler.Task? new RecurringTask(task, TaskType.dynamic, 0, ((TimeScheduler.Task)task).nextInterval(), TimeUnit.MILLISECONDS, can_block) : new Task(task, can_block)); // we'll execute the task directly }
protected Future<?> scheduleRecurring(Runnable work, TaskType type, long initial_delay, long delay, TimeUnit unit, boolean can_block) { return doSchedule(new RecurringTask(work, type, initial_delay, delay, unit, can_block), initial_delay); }
public void execute(Runnable task, boolean can_block) { submitToPool(task instanceof TimeScheduler.Task? new RecurringTask(task, TaskType.dynamic, 0, ((TimeScheduler.Task)task).nextInterval(), TimeUnit.MILLISECONDS, can_block) : new Task(task, can_block)); // we'll execute the task directly }