code: def verify_response_duration(self, expected=None, zero=0, threshold_percent=0,
                                   break_in_fail=True):
          
          was = self.timedelta - zero
          error = abs(was/expected)*100.0 - 100.0 if expected > 0 else 0
          msg = "should: %.3f, was: %.3f, error: %.3f %%" % (expected, was, error)
          self.logger.debug(msg)
          if abs(error) > threshold_percent:
              msg = "Thread::wait error(%.2f %%) was out of bounds (%.2f %%)" \
                    % (error, threshold_percent)
              self.logger.debug(msg)
              if break_in_fail:
                  raise TestStepFail(msg)
          return was, expected, error
docs: Verify that response duration is in bounds.
  
          :param expected: seconds what is expected duration
          :param zero: seconds if one to normalize duration before calculating error rate
          :param threshold_percent: allowed error in percents
          :param break_in_fail: boolean, True if raise TestStepFail when out of bounds
          :return: (duration, expected duration, error)