code: private function durationToMs($duration)
      {
          if(!is_null($duration) && $duration instanceof QtiDuration){
              return TestRunnerUtils::getDurationWithMicroseconds($duration);
          }
          return false;
      }
docs: Converts a duration to milliseconds
  @param QtiDuration|null $duration the duration to convert
  @return int|false the duration in ms or false if none