public function setTimeoutsFromArray($arr) {
    /*
     * Validation is lax in here because this should only ever be used with
     * getTimeouts() return values. If people are using it by hand then there
     * might be something wrong with the API.
     */
    if(!is_array($arr)) {
      throw SagException('Expected an array and got something else.');
    }

    if(is_int($arr['open'])) {
      $this->setOpenTimeout($arr['open']);
    }

    if(is_int($arr['rwSeconds'])) {
      if(is_int($arr['rwMicroseconds'])) {
        $this->setRWTimeout($arr['rwSeconds'], $arr['rwMicroseconds']);
      }
      else {
        $this->setRWTimeout($arr['rwSeconds']);
      }
    }
  }