code: private synchronized void checkNextSecond(double nowInMsRoundedAtSec) {
          // next second
          if (time == nowInMsRoundedAtSec) {
              return;
          }
  
          if (startSec == 0) {
              startSec = nowInMsRoundedAtSec;
          }
          time = nowInMsRoundedAtSec;
  
          Pair<Double, Long> pair = getRPSForSecond((nowInMsRoundedAtSec - startSec) / 1000);
          double nextRps = pair.getLeft();
          if (nextRps < 0) {
              stopping = true;
              int factor = stopTries > 10 ? 2 : 1;
              rps = rps > 0 ? rps * factor : 1;
              stopTest();
              notifyAll();
          } else {
              rps = nextRps;
          }
  
          if (log.isDebugEnabled()) {
              log.debug("Second changed {} , waiting: {}, samples sent {}, current rps: {} rps",
                      ((nowInMsRoundedAtSec - startSec) / 1000), cntDelayed, cntSent, rps);
          }
  
          if (cntDelayed < 1 && cntSent < rps) {
              log.warn("No free threads available in current Thread Group {}, made {} samples/s for expected rps {} samples/s, increase your number of threads",
                      JMeterContextService.getContext().getThreadGroup().getName(), cntSent, rps);
          }
  
          String elementName = getName();
          JMeterUtils.setProperty(elementName + "_totalDuration", String.valueOf(pair.getRight()));
          JMeterUtils.setProperty(elementName + "_cntDelayed", String.valueOf(cntDelayed));
          JMeterUtils.setProperty(elementName + "_cntSent", String.valueOf(cntSent));
          JMeterUtils.setProperty(elementName + "_rps", String.valueOf(rps));
  
          cntSent = 0;
          msecPerReq = 1000d / rps;
      }
docs: If we have switched to next second:
  <li>
  <ul>Updates time</ul>
  <ul>Updates startSec</ul>
  <ul>Resets cntSent</ul>
  </li>
  
  @param nowInMsRoundedAtSec Now in millis rounded as second