public function endTimer(RunnerServiceContext $context, $duration = null, $timestamp = null)
    {
        if ($context instanceof QtiRunnerServiceContext) {
            /* @var TestSession $session */
            $session = $context->getTestSession();
            $session->endItemTimer($duration, $timestamp);
        } else {
            throw new \common_exception_InvalidArgumentType(
                'QtiRunnerService',
                'endTimer',
                0,
                'oat\taoQtiTest\models\runner\QtiRunnerServiceContext',
                $context
            );
        }
        return true;
    }