Browse Source

Merge pull request #59 from jakebathman/master

Add support for fractional timeout seconds
Jan Oris 8 năm trước cách đây
mục cha
commit
6f96e1ccd6
1 tập tin đã thay đổi với 2 bổ sung2 xóa
  1. 2 2
      src/Builder.php

+ 2 - 2
src/Builder.php

@@ -50,12 +50,12 @@ class Builder {
     /**
      * Set the request timeout
      *
-     * @param   integer $timeout    The timeout for the request (in seconds. Default: 30 seconds)
+     * @param   float $timeout    The timeout for the request (in seconds, fractions of a second are okay. Default: 30 seconds)
      * @return Builder
      */
     public function withTimeout($timeout = 30)
     {
-        return $this->withCurlOption( 'TIMEOUT', $timeout );
+        return $this->withCurlOption( 'TIMEOUT_MS', ($timeout * 1000) );
     }
 
     /**