Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.1.4

Bug #4343 Throttle delay is not set correctly
Submitted: 2005-05-13 18:22 UTC
From: pure Assigned: mike
Status: Closed Package: HTTP_Download
PHP Version: Irrelevant OS: All other then WIN_OS
Roadmaps: (Not assigned)    
Subscription  


 [2005-05-13 18:22 UTC] pure
Description: ------------ The throttle feature of the class is not working under anything else then windows. How embarrassing ... Reproduce code: --------------- HTTP/Download.php: function setThrottleDelay($seconds = 0) { $this->throttleDelay = abs($seconds) * 1000; } .... function sleep() { if (OS_WINDOWS) { com_message_pump($this->throttleDelay); } else { usleep($this->throttleDelay); } } http://www.php.net/manual/en/function.usleep.php says: The usleep() function delays program execution for the given number of micro_seconds. A microsecond is one millionth of a second. Solution: function sleep() { if (OS_WINDOWS) { com_message_pump($this->throttleDelay); } else { usleep($this->throttleDelay * 1000); } }

Comments

 [2005-05-17 10:36 UTC] mike
This bug has been fixed in CVS. In case this was a documentation problem, the fix will show up at the end of next Sunday (CET) on pear.php.net. In case this was a pear.php.net website problem, the change will show up on the website in short time. Thank you for the report, and for helping us make PEAR better. Oh dear, how embarrassing ;)