public function setTimeout($timeout) { if ($timeout !== null) { $this->timer = Timer::add(function () { $this(); }, $timeout); } }