code: public static long getIdleTimeMillis() {
      long latestEndTimeMillis = -1;
  
      // If there are any running rapids queries, consider that not idle.
      if (activeRapidsExecs.get() > 0) {
        updateNotIdle();
      }
      else {
        // If there are any running jobs, consider that not idle.
        // Remember the latest job ending time as well.
        Job[] jobs = Job.jobs();
        for (int i = jobs.length - 1; i >= 0; i--) {
          Job j = jobs[i];
          if (j.isRunning()) {
            updateNotIdle();
            break;
          }
  
          if (j.end_time() > latestEndTimeMillis) {
            latestEndTimeMillis = j.end_time();
          }
        }
      }
  
      long latestTimeMillis = Math.max(latestEndTimeMillis, lastTimeSomethingHappenedMillis);
  
      // Calculate milliseconds and clamp at zero.
      long now = System.currentTimeMillis();
      long deltaMillis = now - latestTimeMillis;
      if (deltaMillis < 0) {
        deltaMillis = 0;
      }
      return deltaMillis;
    }
docs: Get the number of milliseconds the H2O cluster has been idle.
  @return milliseconds since the last interesting thing happened.