From: Nikita Popov Date: Wed, 29 Apr 2020 08:12:53 +0000 (+0200) Subject: Make 045.phpt busy wait X-Git-Tag: php-7.4.7RC1~43^2~1 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b1b98e08d0ad4bbbb213c002188ffa47075a8b0d;p=php 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. --- diff --git a/tests/lang/045.phpt b/tests/lang/045.phpt index 44fb801410..e5299ae222 100644 --- a/tests/lang/045.phpt +++ b/tests/lang/045.phpt @@ -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(); ?>