code: protected function buildTimeConstraints(RunnerServiceContext $context)
      {
          $constraints = [];
  
          $session = $context->getTestSession();
          foreach ($session->getRegularTimeConstraints() as $constraint) {
              if ($constraint->getMaximumRemainingTime() != false || $constraint->getMinimumRemainingTime() != false) {
                  $constraints[] = $constraint;
              }
          }
  
          return $constraints;
      }
docs: Build an array where each cell represent a time constraint (a.k.a. time limits)
  in force. Each cell is actually an array with two keys:
  
  * 'source': The identifier of the QTI component emitting the constraint (e.g. AssessmentTest, TestPart, AssessmentSection, AssessmentItemRef).
  * 'seconds': The number of remaining seconds until it times out.
  
  @param RunnerServiceContext $context
  @return array