private void waitABit(@SuppressWarnings("SameParameterValue") long maxTotalDelayMillis) {
      final long THRESHOLD_MS = 50;
      long naturalDelay = System.currentTimeMillis() - myLastStartedTestConnectionMillis;
      if (naturalDelay > 0 && naturalDelay + THRESHOLD_MS < maxTotalDelayMillis) {
        try {
          Thread.sleep(maxTotalDelayMillis - naturalDelay - THRESHOLD_MS);
        }
        catch (InterruptedException ignored) {
          //
        }
      }
      myLastStartedTestConnectionMillis = -1;
    }
private void waitABit(@SuppressWarnings("SameParameterValue") long maxTotalDelayMillis)