Initial commit

This commit is contained in:
2018-04-15 16:41:46 +02:00
commit 86ff40274b
29 changed files with 1368 additions and 0 deletions

15
examples/timers.php Normal file
View File

@ -0,0 +1,15 @@
<?php
require_once __DIR__."/../vendor/autoload.php";
use NoccyLabs\Ipc\Interop\Async\Timer;
$timer1 = new Timer(function () { echo "Hello "; });
$timer2 = new Timer(function () { echo "World! "; });
for ($n = 0; $n < 1000; $n++) {
if ($n == 500) {
unset($timer2);
}
usleep(10000);
}