1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00

Make 045.phpt busy wait

The timeout is only real-time based on Windows. Make this use
a busy wait loop instead. If hard_timeout is broken, this will
fail with a run-tests enforced timeout instead.
This commit is contained in:
Nikita Popov
2020-04-29 10:12:53 +02:00
parent 75470bc312
commit b1b98e08d0

View File

@@ -13,13 +13,7 @@ set_time_limit(1);
register_shutdown_function("plop");
function plop() {
$ts = time();
while(true) {
if ((time()-$ts) > 2) {
echo "Failed!";
break;
}
}
while (true);
}
plop();
?>