public function setDuration($seconds)
    {
        $seconds = round($seconds, 3);

        if ($seconds < 0 || $seconds > 999999.999) {
            throw new InvalidArgumentException('Duration seconds must be in range 0-999999.999');
        }

        $this->duration = $seconds;

        return $this;
    }
public function setDuration($seconds)
    {
        $seconds = round($seconds, 3);

        if ($seconds < 0 || $seconds > 999999.999) {
            throw new InvalidArgumentException('Duration seconds must be in range 0-999999.999');
        }

        $this->duration = $seconds;

        return $this;
    }
public function setDuration ( $ seconds ) { $ seconds = round ( $ seconds , 3 ) ; if ( $ seconds < 0 || $ seconds > 999999.999 ) { throw new InvalidArgumentException ( 'Duration seconds must be in range 0-999999.999' ) ; } $ this -> duration = $ seconds ; return $ this ; }
Set custom duration value

@param float $seconds min 0; max 999999.999

@return $this
Set custom duration value