docs: public long getNextUniqueId() {
          // get the current time, usually the salt value is zero
          // in testing it is used to simulate clock skew
          long currentTime = m_clock.get() + m_timestampTestingSalt;
          long currentTimePlusOffset = currentTime + m_backwardsTimeAdjustmentOffset;
          if (currentTime == lastUsedTime) {
              // increment the counter for this millisecond
              counterValue++;
  
              // handle the case where we've run out of counter values
              // for this particular millisecond (feels unlikely)
              if (counterValue > COUNTER_MAX_VALUE) {
                  // spin until the next millisecond
                  while (currentTime == lastUsedTime)
                      currentTime = m_clock.get();
                  // reset the counter and lastUsedTime for the new millisecond
                  lastUsedTime = currentTime;
                  counterValue = 0;
              }
          }
          else {
              // reset the counter and lastUsedTime for the new millisecond
              if (currentTime < lastUsedTime && currentTimePlusOffset < lastUsedTime) {
                  /*
                   * Time moved backwards, if was less than three seconds, spin to let it catch up
                   * otherwise calculate an offset to add to the system clock in order to use it to
                   * continue moving forward
                   */
                  double diffSeconds = (lastUsedTime - currentTime) / 1000.0;
                  // if the diff is less than some specified amount of time, wait a bit
                  StringBuilder msg = new StringBuilder(256);
                  if ((lastUsedTime - currentTime) < BACKWARD_TIME_FORGIVENESS_WINDOW_MS) {
                      msg.append("UniqueIdGenerator time moved backwards from: %d to %d, a difference of %.2f seconds.");
                      msg.append("\nThis node will delay any stored procedures sent to it.");
                      msg.append("\nThis node will resume full operation in  %.2f seconds.");
                      log.rateLimitedLog(60, Level.INFO, null, msg.toString(), lastUsedTime, currentTime, diffSeconds, diffSeconds );
  
                      long count = BACKWARD_TIME_FORGIVENESS_WINDOW_MS;
                      // note, the loop should stop once lastUsedTime is PASSED, not current
                      while ((currentTime <= lastUsedTime) && (count-- > 0)) {
                          try {
                              m_clock.sleep(1);
                          } catch (InterruptedException e) {}
                          currentTime = m_clock.get();
                      }
                      // if the loop above ended because it ran too much, time is pretty darn wonky.
                      // Going to let it crash in this instance
                      if (count < 0) {
                          VoltDB.crashLocalVoltDB("VoltDB was unable to recover after the system time was externally negatively adusted. " +
                                  "It is possible that there is a serious system time or NTP error. ", false, null);
                      }
                  }
                  // Calculate an offset that will keep time moving forward at the rate of the system clock
                  // but at the current time, not the time the system clock shifted back too.
                  else {
                      m_backwardsTimeAdjustmentOffset = lastUsedTime - currentTime + 1;
                      //Since we calculated a new offset, recalculate the current time + the offset
                      currentTimePlusOffset = currentTime + m_backwardsTimeAdjustmentOffset;
                      //Should satisfy this constraint now
                      assert(currentTimePlusOffset > lastUsedTime);
                      double offsetSeconds = m_backwardsTimeAdjustmentOffset / 1000.0D;
  
                      msg.append("UniqueIdGenerator time moved backwards from: %d to %d, a difference of %.2f seconds.");
                      msg.append("\nContinuing operation by adding an offset of %.2f to system time. ");
                      msg.append("This means the time and unique IDs provided by VoltProcedure ");
                      msg.append(" (getUniqueId, getTransactionId, getTransactionTime) ");
                      msg.append("will not correctly reflect wall clock time as reported by the system clock.");
                      msg.append(" For severe shifts you could see duplicate ");
                      msg.append("IDs or time moving backwards when the server is");
                      msg.append(" restarted causing the offset to be discarded.");
  
                      log.rateLimitedLog(60, Level.ERROR, null, msg.toString(), lastUsedTime, currentTime, diffSeconds, offsetSeconds);
                  }
              } else if (currentTime > lastUsedTime && m_backwardsTimeAdjustmentOffset != 0) {
                  //Actual wall clock time is correct, blast away the offset
                  //and switch to current time
                  m_backwardsTimeAdjustmentOffset = 0;
                  currentTimePlusOffset = currentTime;
                  log.error("Host clock seems to have adjusted again to make the offset unecessary");
                  System.err.println("Host clock seems to have adjusted again to make the offset unecessary");
              }
              currentTime = currentTimePlusOffset;
              lastUsedTime = currentTime;
              counterValue = 0;
          }
  
          lastUniqueId = makeIdFromComponents(currentTime, counterValue, partitionId);
  
          return lastUniqueId;
      }