aboutsummaryrefslogtreecommitdiffhomepage
path: root/assets/php/vendor/react/event-loop/examples/91-benchmark-ticks.php
blob: 3f4690b3a95d334c614b8fb8a63454990423728d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
<?php

use React\EventLoop\Factory;

require __DIR__ . '/../vendor/autoload.php';

$loop = Factory::create();

$n = isset($argv[1]) ? (int)$argv[1] : 1000 * 100;

for ($i = 0; $i < $n; ++$i) {
    $loop->futureTick(function () { });
}

$loop->run();