@Override public void execute() { timerRef.set(RxTimer.this.core.setPeriodic(delay,this)); } });
public void handle(Long id) { action.call(); // Ensure still active if (innerSubscription.isUnsubscribed()) return; // Start the repeating timer timers.add(vertx.setPeriodic(unit.toMillis(delayTime),new Handler<Long>() { public void handle(Long nestedId) { if (innerSubscription.isUnsubscribed()) return; action.call(); } })); } };
/** * Sets a periodic handler. */ public static LongValue setPeriodic(Env env, LongValue delay, Value handler) { PhpTypes.assertCallable(env, handler, "Handler argument to Vertx::runOnContext() must be callable."); PhpVerticleFactory.vertx.setPeriodic(delay.toLong(), HandlerFactory.<Long>createGenericHandler(env, handler)); return delay; }
vertx.setPeriodic(QUORUM_CHECK_PERIOD, new Handler<Long>() { @Override public void handle(Long timerID) {