PHP 4.0 Bug #9340 Updated: usleep function doesn't work properly under winNT 4.0

From: Date: Fri, 23 Feb 2001 00:26:17 +0000
Subject: PHP 4.0 Bug #9340 Updated: usleep function doesn't work properly under winNT 4.0
Groups: php.dev 
Request: Send a blank email to php-dev+get-47310@lists.php.net to get a copy of this message
ID: 9340 Updated by: sniper Reported By: dror@europe.com Old-Status: Open Status: Feedback Old-Bug Type: Unknown/Other Function Bug Type: Date/time related Assigned To: Comments: Please try the latest dev build from http://www.php4win.de/ (under downloads) as this should be fixed already in CVS. IIRC --Jani Previous Comments: --------------------------------------------------------------------------- [2001-02-19 13:16:08] dror@europe.com here is the wrong code (current) + my correction: ---- > Wrong (current) <---- PHP_FUNCTION(usleep) { #if HAVE_USLEEP pval **num; if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &num) == FAILURE) { WRONG_PARAM_COUNT; } convert_to_long_ex(num); usleep((*num)->value.lval); #endif } ---- > Correction <---- PHP_FUNCTION(usleep) { pval **num; if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &num) == FAILURE) { WRONG_PARAM_COUNT; } convert_to_long_ex(num); #if HAVE_USLEEP usleep((*num)->value.lval); #elif PHP_WIN32 Sleep( ((*num)->value.lval+999)/1000); #endif } Dror. --------------------------------------------------------------------------- ATTENTION! Do NOT reply to this email! To reply, use the web interface found at http://bugs.php.net/?id=9340&edit=2

« previous php.dev (#47310) next »