code: boolean manageIdlePool(ThreadPoolExecutor threadPool, long intervalCompleted) {
  
          // Manage the intervalCompleted count
          if (intervalCompleted == 0 && threadPool.getActiveCount() == 0) {
              consecutiveIdleCount++;
          } else {
              consecutiveIdleCount = 0;
          }
  
          if (consecutiveIdleCount >= IDLE_INTERVALS_BEFORE_PAUSE) {
              pause();
              lastAction = LastAction.PAUSE;
              return true;
          }
  
          return false;
      }
docs: Determine whether or not the thread pool has been idle long enough to
  pause the monitoring task.
  
  @param threadPool a reference to the thread pool
  @param intervalCompleted the tasks completed this interval
  
  @return true if the controller has been paused