private void flushNow() {
    ThreadingAssertions.assertEventDispatchThread();
    synchronized (getQueueLock()) {
      FLUSHER_SCHEDULED = false;
    }
    ApplicationEx app = ApplicationManagerEx.getApplicationEx();
    long startTime = System.currentTimeMillis();
    while (true) {
      RunnableInfo info = pollNextEvent();
      if (info == null) {
        break;
      }
      runNextEvent(info, app);
      if (InvocationUtil.priorityEventPending() || System.currentTimeMillis() - startTime > 5) {
        synchronized (getQueueLock()) {
          requestFlush();
        }
        break;
      }
    }
  }
private void flushNow()