public function setDuration(TimeInterface $duration): AlarmInterface
    {
        $this->attributes["Duration"] = $duration->asString();

        return $this->save();
    }
public function setDuration(TimeInterface $duration): AlarmInterface
    {
        $this->attributes["Duration"] = $duration->asString();

        return $this->save();
    }
public function setDuration ( TimeInterface $ duration ) : AlarmInterface { $ this -> attributes [ "Duration" ] = $ duration -> asString ( ) ; return $ this -> save ( ) ; }
Set the duration of the alarm.

@param TimeInterface $duration The duration of the alarm

@return $this
Set the duration of the alarm .