Thruway\Connection::doEvents PHP Method

doEvents() public method

Deprecation: Process events at a set interval
public doEvents ( integer $timer = 1 )
$timer integer
    public function doEvents($timer = 1)
    {
        $loop = $this->getClient()->getLoop();
        $looping = true;
        $loop->addTimer($timer, function () use(&$looping) {
            $looping = false;
        });
        while ($looping) {
            usleep(1000);
            $loop->tick();
        }
    }