Skip to content

Commit c83c26a

Browse files
committed
add timer test
1 parent 6ce8791 commit c83c26a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/timer.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,14 @@
1212

1313
$loop = \React\EventLoop\Factory::create();
1414
$loop->addPeriodicTimer(60, function() {
15-
while(true) {
15+
for($i=0; $i<10; $i++) {
1616
echo "function A", PHP_EOL;
1717
sleep(1);
1818
}
1919
});
2020

2121
$loop->addPeriodicTimer(60, function() {
22-
while(true) {
22+
for($i=0; $i<10; $i++) {
2323
echo "function B", PHP_EOL;
2424
sleep(1);
2525
}

0 commit comments

Comments
 (0)