Rx\Scheduler\VirtualTimeScheduler::start PHP Method

start() public method

public start ( )
    public function start()
    {
        if (!$this->isEnabled) {
            $this->isEnabled = true;
            $comparer = $this->comparer;
            do {
                $next = $this->getNext();
                if ($next !== null) {
                    if ($comparer($next->getDueTime(), $this->clock) > 0) {
                        $this->clock = $next->getDueTime();
                    }
                    $next->inVoke();
                } else {
                    $this->isEnabled = false;
                }
            } while ($this->isEnabled);
        }
    }