code: private void updateLocalityWaitTimes(long currentTime) {
      long timeSinceLastHeartbeat =
        (lastHeartbeatTime == 0 ? 0 : currentTime - lastHeartbeatTime);
      lastHeartbeatTime = currentTime;
      for (JobInfo info: infos.values()) {
        if (info.skippedAtLastHeartbeat) {
          info.timeWaitedForLocalMap += timeSinceLastHeartbeat;
          // We reset the flag so that timeWaitedForLocalMap is increment only
          // once. It will be increment again if skippedAtLastHeartbeat is set
          // to true next time.
          info.skippedAtLastHeartbeat = false;
        }
      }
    }
docs: Update locality wait times for jobs that were skipped at last heartbeat.