models/classes/runner/time/QtiTimer.php
public function end($tags, $timestamp)
    {
        // check the provided arguments
        if (!is_numeric($timestamp) || $timestamp < 0) {
            throw new InvalidDataException('end() needs a valid timestamp!');
        }

        // extract the TimePoint identification from the provided item, and find existing range
        $range = $this->getRange($tags);

        // validate the data consistence
        if ($this->isRangeOpen($range)) {
            $this->checkTimestampCoherence($range, $timestamp);

            // append the new END TimePoint
            $point = new TimePoint($tags, $timestamp, TimePoint::TYPE_END, TimePoint::TARGET_SERVER);
            $this->timeLine->add($point);    
        } else {
            // already closed range found, just log the info
            \common_Logger::t('Range already closed, or missing START TimePoint in QtiTimer, continue anyway');
        }

        return $this;
    }
public function end($tags, $timestamp)
    {
        // check the provided arguments
        if (!is_numeric($timestamp) || $timestamp < 0) {
            throw new InvalidDataException('end() needs a valid timestamp!');
        }

        // extract the TimePoint identification from the provided item, and find existing range
        $range = $this->getRange($tags);

        // validate the data consistence
        if ($this->isRangeOpen($range)) {
            $this->checkTimestampCoherence($range, $timestamp);

            // append the new END TimePoint
            $point = new TimePoint($tags, $timestamp, TimePoint::TYPE_END, TimePoint::TARGET_SERVER);
            $this->timeLine->add($point);    
        } else {
            // already closed range found, just log the info
            \common_Logger::t('Range already closed, or missing START TimePoint in QtiTimer, continue anyway');
        }

        return $this;
    }
public function end ( $ tags , $ timestamp ) { // check the provided arguments if ( ! is_numeric ( $ timestamp ) || $ timestamp < 0 ) { throw new InvalidDataException ( 'end() needs a valid timestamp!' ) ; } // extract the TimePoint identification from the provided item, and find existing range $ range = $ this -> getRange ( $ tags ) ; // validate the data consistence if ( $ this -> isRangeOpen ( $ range ) ) { $ this -> checkTimestampCoherence ( $ range , $ timestamp ) ; // append the new END TimePoint $ point = new TimePoint ( $ tags , $ timestamp , TimePoint :: TYPE_END , TimePoint :: TARGET_SERVER ) ; $ this -> timeLine -> add ( $ point ) ; } else { // already closed range found, just log the info \ common_Logger :: t ( 'Range already closed, or missing START TimePoint in QtiTimer, continue anyway' ) ; } return $ this ; }
Adds a "server end" TimePoint at a particular timestamp for the provided ItemRef
@param string|array $tags
@param float $timestamp
@return Timer
@throws TimeException
Adds a server end TimePoint at a particular timestamp for the provided ItemRef