code: private void scheduleQueueFlush(final Context context) {
          if (commsRunnable == null)
              commsRunnable = new Runnable() {
                  @Override
                  public void run() {
                      flushQueueAsync(context);
                  }
              };
          // Cancel any outstanding send runnables, and issue a new delayed one
          getHandlerUsingMainLooper().removeCallbacks(commsRunnable);
          getHandlerUsingMainLooper().postDelayed(commsRunnable, Constants.PUSH_DELAY_MS);
  
          getConfigLogger().verbose(getAccountId(), "Scheduling delayed queue flush on main event loop");
      }
docs: Event