@Override
  public @NotNull ScheduledFuture<?> schedule(@NotNull Runnable command, @NotNull ModalityState modalityState, long delay, TimeUnit unit) {
    return delayedExecute(new MyScheduledFutureTask<Void>(
      ThreadContext.captureThreadContext(command),
      null,
      triggerTime(delay, unit)) {
      @Override
      boolean executeMeInBackendExecutor() {
        // optimization: can be cancelled already
        if (!isDone()) {
          ApplicationManager.getApplication().invokeLater(this, modalityState, __ -> {
            return isCancelled();
          });
        }
        return true;
      }
    });
  }
@Override
  public @NotNull ScheduledFuture<?> schedule(@NotNull Runnable command, @NotNull ModalityState modalityState, long delay, TimeUnit unit)