@Override
    public void run() {

      ID neighbor = nextNeighbor;
      if (logger.isDebugEnabled()) {
        logger.debug("cluster health monitor invoked with {}", neighbor);
      }
      try {
        if (isStopping) {
          return;
        }

        // TODO - why are we taking two clock readings and setting currentTimeStamp twice?
        long currentTime = System.currentTimeMillis();
        // this is the start of interval to record member activity
        currentTimeStamp = currentTime;

        long oldTimeStamp = currentTimeStamp;
        currentTimeStamp = System.currentTimeMillis();

        GMSMembershipView<ID> myView = currentView;
        if (myView == null) {
          return;
        }

        if (currentTimeStamp - oldTimeStamp > monitorInterval + MONITOR_DELAY_THRESHOLD) {
          // delay in running this task - don't suspect anyone for a while
          logger.info(
              "Failure detector has noticed a JVM pause and is giving all members a heartbeat in view {}",
              currentView);
          for (ID member : myView.getMembers()) {
            contactedBy(member);
          }
          return;
        }

        if (neighbor != null) {
          TimeStamp nextNeighborTS;
          synchronized (GMSHealthMonitor.this) {
            nextNeighborTS = memberTimeStamps.get(neighbor);
          }

          if (nextNeighborTS == null) {
            logger.debug("timestamp for {} was found null - setting current time as timestamp",
                neighbor);
            TimeStamp customTS = new TimeStamp(currentTime);
            memberTimeStamps.put(neighbor, customTS);
            return;
          }

          long interval = memberTimeoutInMillis / GMSHealthMonitor.LOGICAL_INTERVAL;
          long lastTS = currentTime - nextNeighborTS.getTime();
          if (lastTS + interval >= memberTimeoutInMillis) {
            logger.debug("Checking member {} ", neighbor);
            // now do check request for this member;
            checkMember(neighbor);
          }
        }
      } finally {
        if (logger.isDebugEnabled()) {
          logger.debug("cluster health monitor pausing");
        }
      }
    }
Here we use the same threshold for detecting JVM pauses as the StatSampler
geode-membership/src/main/java/org/apache/geode/distributed/internal/membership/gms/fd/GMSHealthMonitor.java