public function setMaxTime(QtiDuration $maxTime = null)
    {
        // Prevent to get 0s durations stored.
        if (is_null($maxTime) === false && $maxTime->getSeconds(true) === 0) {
            $maxTime = null;
        }

        $this->maxTime = $maxTime;
    }
public function setMaxTime(QtiDuration $maxTime = null)
    {
        // Prevent to get 0s durations stored.
        if (is_null($maxTime) === false && $maxTime->getSeconds(true) === 0) {
            $maxTime = null;
        }

        $this->maxTime = $maxTime;
    }
public function setMaxTime ( QtiDuration $ maxTime = null ) { // Prevent to get 0s durations stored. if ( is_null ( $ maxTime ) === false && $ maxTime -> getSeconds ( true ) === 0 ) { $ maxTime = null ; } $ this -> maxTime = $ maxTime ; }
Set the maximum time or null if unlimited.

@param \qtism\common\datatypes\Duration $maxTime A duration object or null if unlimited.
Set the maximum time or null if unlimited .