public void addPoller(PollRunnable task, long delay, TimeUnit timeUnit) {
    ScheduledExecutorService service = executor.get();
    if (service != null) {
      service.scheduleWithFixedDelay(task, 0, delay, timeUnit);
    } else {
      throw new IllegalStateException(
          "you must start the scheduler before tasks can be submitted");
    }
  }
public void addPoller ( PollRunnable task , long delay , TimeUnit timeUnit ) { ScheduledExecutorService service = executor . get ( ) ; if ( service != null ) { service . scheduleWithFixedDelay ( task , 0 , delay , timeUnit ) ; } else { throw new IllegalStateException ( "you must start the scheduler before tasks can be submitted" ) ; } }
Add a tasks to execute at a fixed rate based on the provided delay.