public function start() {
        if ($this->watcher !== null) {
            return;
        }

        $this->watcher = Loop::repeat($this->checkInterval, function () {
            // Use double defer to calculate complete tick time
            // instead of timer → defer time.
            Loop::unreference(Loop::defer($this->check));
        });

        Loop::unreference($this->watcher);
    }
public function start() {
        if ($this->watcher !== null) {
            return;
        }

        $this->watcher = Loop::repeat($this->checkInterval, function () {
            // Use double defer to calculate complete tick time
            // instead of timer → defer time.
            Loop::unreference(Loop::defer($this->check));
        });

        Loop::unreference($this->watcher);
    }
public function start ( ) { if ( $ this -> watcher !== null ) { return ; } $ this -> watcher = Loop :: repeat ( $ this -> checkInterval , function ( ) { // Use double defer to calculate complete tick time // instead of timer → defer time. Loop :: unreference ( Loop :: defer ( $ this -> check ) ) ; } ) ; Loop :: unreference ( $ this -> watcher ) ; }
Start the detector.
Start the detector .