public function readDuration()
    {
        try {
            return new QtiDuration($this->readString());
        } catch (BinaryStreamAccessException $e) {
            $msg = "An error occured while reading a duration.";
            throw new QtiBinaryStreamAccessException($msg, $this, QtiBinaryStreamAccessException::DURATION, $e);
        }
    }
public function readDuration()
    {
        try {
            return new QtiDuration($this->readString());
        } catch (BinaryStreamAccessException $e) {
            $msg = "An error occured while reading a duration.";
            throw new QtiBinaryStreamAccessException($msg, $this, QtiBinaryStreamAccessException::DURATION, $e);
        }
    }
public function readDuration ( ) { try { return new QtiDuration ( $ this -> readString ( ) ) ; } catch ( BinaryStreamAccessException $ e ) { $ msg = "An error occured while reading a duration." ; throw new QtiBinaryStreamAccessException ( $ msg , $ this , QtiBinaryStreamAccessException :: DURATION , $ e ) ; } }
Read a Duration from the current binary stream.

@throws \qtism\runtime\storage\binary\QtiBinaryStreamAccessException
@return \qtism\common\datatypes\Duration A Duration object.
Read a Duration from the current binary stream .