Remove debug code from usleep()

This was added to debug CI failures, but ultimately didn't help
understand the macos timing issues. Drop it now so it's not
forgotten...
This commit is contained in:
Nikita Popov 2020-06-16 14:51:58 +02:00
parent bbe74a6e3a
commit 2c207ebe6b

View File

@ -1242,7 +1242,6 @@ PHP_FUNCTION(sleep)
Delay for a given number of micro seconds */
PHP_FUNCTION(usleep)
{
#if HAVE_USLEEP
zend_long num;
ZEND_PARSE_PARAMETERS_START(1, 1)
@ -1253,12 +1252,9 @@ PHP_FUNCTION(usleep)
zend_argument_value_error(1, "must be greater than or equal to 0");
RETURN_THROWS();
}
if (usleep((unsigned int)num) < 0) {
#if ZEND_DEBUG
php_error_docref(NULL, E_NOTICE, "usleep() failed with errno %d: %s",
errno, strerror(errno));
#endif
}
#if HAVE_USLEEP
usleep((unsigned int)num);
#endif
}
/* }}} */