@Override
    public void run() {
      endTime = nanoTime() + toNano(endTime);  // ttl was in ms

      // loop for specified amount of time
      while (nanoTime() <= endTime && !isInterrupted()) {
        try {
          long start = nanoTime();
          targetLock.lock();
          ++lockCount;
          long diff = nanoTime() - start;
          lockWaitSum += diff;
          lockWaitMax = max(diff, lockWaitMax);

          while (nanoTime() <= (start + toNano(LOCK_HOLD_TIME))) {
            // spin for LOCK_HOLD_TIME ms (under lock)
          }
        } finally {
          targetLock.unlock();
        }
      }
    }
Returns the highest lock time in nano seconds.
@return The highest (single) lock wait time (in nanos)
llap-common/src/test/org/apache/hadoop/hive/llap/metrics/TestReadWriteLockMetrics.java