kahlan\Expectation::_spin PHP Method

_spin() protected method

Runs the expectation.
protected _spin ( Closure $closure )
$closure Closure The closure to run/spin.
    protected function _spin($closure)
    {
        if (($timeout = $this->timeout()) < 0) {
            $closure();
        } else {
            Code::spin($closure, $timeout);
        }
    }