public function setRWTimeout($seconds, $microseconds) {
    if(!is_int($microseconds) || $microseconds < 0) {
      throw new SagException('setRWTimeout() expects $microseconds to be an integer >= 0.');
    }

    //TODO make this better, including checking $microseconds
    //$seconds can be 0 if $microseconds > 0
    if(
      !is_int($seconds) ||
      (
        (!$microseconds && $seconds < 1) ||
        ($microseconds && $seconds < 0)
      )
    ) {
      throw new SagException('setRWTimeout() expects $seconds to be a positive integer.');
    }

    $this->socketRWTimeoutSeconds = $seconds;
    $this->socketRWTimeoutMicroseconds = $microseconds;
  }
public function setRWTimeout($seconds, $microseconds) {
    if(!is_int($microseconds) || $microseconds < 0) {
      throw new SagException('setRWTimeout() expects $microseconds to be an integer >= 0.');
    }

    //TODO make this better, including checking $microseconds
    //$seconds can be 0 if $microseconds > 0
    if(
      !is_int($seconds) ||
      (
        (!$microseconds && $seconds < 1) ||
        ($microseconds && $seconds < 0)
      )
    ) {
      throw new SagException('setRWTimeout() expects $seconds to be a positive integer.');
    }

    $this->socketRWTimeoutSeconds = $seconds;
    $this->socketRWTimeoutMicroseconds = $microseconds;
  }
public function setRWTimeout ( $ seconds , $ microseconds ) { if ( ! is_int ( $ microseconds ) || $ microseconds < 0 ) { throw new SagException ( 'setRWTimeout() expects $microseconds to be an integer >= 0.' ) ; } //TODO make this better, including checking $microseconds //$seconds can be 0 if $microseconds > 0 if ( ! is_int ( $ seconds ) || ( ( ! $ microseconds && $ seconds < 1 ) || ( $ microseconds && $ seconds < 0 ) ) ) { throw new SagException ( 'setRWTimeout() expects $seconds to be a positive integer.' ) ; } $ this -> socketRWTimeoutSeconds = $ seconds ; $ this -> socketRWTimeoutMicroseconds = $ microseconds ; }
Set how long we should wait for an HTTP request to be executed.

@param int $seconds The number of seconds.
@param int $microseconds The number of microseconds.
Set how long we should wait for an HTTP request to be executed .