diff --git a/tests/basic/timeout_config.inc b/tests/basic/timeout_config.inc index 3bd9eeaa708..5cd156f471f 100644 --- a/tests/basic/timeout_config.inc +++ b/tests/basic/timeout_config.inc @@ -2,9 +2,9 @@ $t = 3; -function busy_wait($how_long) -{ - $until = microtime(TRUE) + $how_long; - - while ($until > microtime(TRUE)); +function busy_wait($how_long) { + $until = microtime(true) + $how_long; + do { + for ($i = 0; $i < 1000000; $i++); + } while ($until > microtime(true)); }