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

From: Date: Mon, 19 Feb 2001 18:16:08 +0000
Subject: PHP 4.0 Bug #9340: usleep function doesn't work properly under winNT 4.0
Groups: php.dev 
Request: Send a blank email to php-dev+get-46940@lists.php.net to get a copy of this message
From: dror@europe.com Operating system: winNT 4.0 PHP version: 4.0.4pl1 PHP Bug Type: Unknown/Other Function Bug description: usleep function doesn't work properly under winNT 4.0 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. -- Edit Bug report at: http://bugs.php.net/?id=9340&edit=1

« previous php.dev (#46940) next »