Skip to content

Commit 2c207eb

Browse files
committed
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...
1 parent bbe74a6 commit 2c207eb

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

ext/standard/basic_functions.c

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1242,7 +1242,6 @@ PHP_FUNCTION(sleep)
12421242
Delay for a given number of micro seconds */
12431243
PHP_FUNCTION(usleep)
12441244
{
1245-
#if HAVE_USLEEP
12461245
zend_long num;
12471246

12481247
ZEND_PARSE_PARAMETERS_START(1, 1)
@@ -1253,12 +1252,9 @@ PHP_FUNCTION(usleep)
12531252
zend_argument_value_error(1, "must be greater than or equal to 0");
12541253
RETURN_THROWS();
12551254
}
1256-
if (usleep((unsigned int)num) < 0) {
1257-
#if ZEND_DEBUG
1258-
php_error_docref(NULL, E_NOTICE, "usleep() failed with errno %d: %s",
1259-
errno, strerror(errno));
1260-
#endif
1261-
}
1255+
1256+
#if HAVE_USLEEP
1257+
usleep((unsigned int)num);
12621258
#endif
12631259
}
12641260
/* }}} */

0 commit comments

Comments
 (0)