void setTimeout(final DomGlobal.SetTimeoutCallbackFn callback, final double delay) { DomGlobal.setTimeout(callback, delay); }
void setTimeout(final SetTimeoutCallbackFn callback, final double delay) { DomGlobal.setTimeout(callback, delay); }
public void onDataTypeEditModeToggle(final @Observes DataTypeEditModeToggleEvent event) { /* Delaying the 'onDataTypeEditModeToggleCallback' since external events * refresh the menu widget and override this change. */ setTimeout(getOnDataTypeEditModeToggleCallback(event), 250); }
@JsOverlay public static final double setTimeout(TrustedScript callback, double delay, Object... var_args) { return setTimeout( Js.<DomGlobal.SetTimeoutCallbackUnionType>uncheckedCast(callback), delay, var_args); }
@JsOverlay public static final double setTimeout( DomGlobal.SetTimeoutCallbackFn callback, double delay, Object... var_args) { return setTimeout( Js.<DomGlobal.SetTimeoutCallbackUnionType>uncheckedCast(callback), delay, var_args); }
@JsOverlay public static final double setTimeout(String callback, double delay, Object... var_args) { return setTimeout( Js.<DomGlobal.SetTimeoutCallbackUnionType>uncheckedCast(callback), delay, var_args); }
@JsOverlay public static final double setTimeout(String callback, double delay, Object... var_args) { return setTimeout( Js.<DomGlobal.SetTimeoutCallbackUnionType>uncheckedCast(callback), delay, var_args); }
@JsOverlay public static final double setTimeout(TrustedScript callback) { return setTimeout(Js.<DomGlobal.SetTimeoutCallbackUnionType>uncheckedCast(callback)); }
@JsOverlay public static final double setTimeout(String callback) { return setTimeout(Js.<DomGlobal.SetTimeoutCallbackUnionType>uncheckedCast(callback)); }
public static native double setTimeout( DomGlobal.SetTimeoutCallbackUnionType callback, double delay, Object... var_args);
public static native double setTimeout( DomGlobal.SetTimeoutCallbackUnionType callback, double delay, Object... var_args);
/** * Schedules a timer to elapse in the future. If the timer is already running then it will be * first canceled before re-scheduling. * * @param delayMillis how long to wait before the timer elapses, in milliseconds */ public void schedule(int delayMillis) { if (delayMillis < 0) { throw new IllegalArgumentException("must be non-negative"); } if (isRunning()) { cancel(); } isRepeating = false; timerId = DomGlobal.setTimeout(createTimeoutCallback(this), delayMillis); }
@Override public Disposable schedule(Runnable action, long delayTime, TimeUnit unit) { action = RxJavaPlugins.onSchedule(action); ScheduledAction scheduledAction = new ScheduledAction(action); if (incremental && (delayTime <= 0 || unit == null)) { Promise.resolve(0).then(o -> { scheduledAction.run(); return null; }); } else { DomGlobal.setTimeout(args -> scheduledAction.run(), (int) unit.toMillis(delayTime)); } return scheduledAction; }
@Override public Disposable schedule(Runnable action, long delayTime, TimeUnit unit) { action = RxJavaPlugins.onSchedule(action); ScheduledAction scheduledAction = new ScheduledAction(action); if (incremental && (delayTime <= 0 || unit == null)) { Promise.resolve(0).then(o -> { scheduledAction.run(); return null; }); } else { DomGlobal.setTimeout(args -> scheduledAction.run(), (int) unit.toMillis(delayTime)); } return scheduledAction; }