code: private function getTimeConstraint(TestSession $session, QtiComponent $source, $navigationMode)
      {
          $constraint = new QtiTimeConstraint(
              $source,
              $session->getTimerDuration($source->getIdentifier()),
              $navigationMode,
              true,
              true,
              $session->getTimerTarget()
          );
          $constraint->setTimer($session->getTimer());
          return $constraint;
      }
docs: Get the time constraint for the given component
  @param TestSession  $session the running test session
  @param QtiComponent $source the component with the time limits (testPart, section, itemRef)
  @param int          $navigationMode the testPart navigation mode
  @return QtiTimeConstraint the constraint