pocketmine\scheduler\TaskHandler::setNextRun PHP Method

setNextRun() public method

public setNextRun ( integer $ticks )
$ticks integer
    public function setNextRun($ticks)
    {
        $this->nextRun = $ticks;
    }

Usage Example

Example #1
0
 private function handle(TaskHandler $handler)
 {
     if ($handler->isDelayed()) {
         $nextRun = $this->currentTick + $handler->getDelay();
     } else {
         $nextRun = $this->currentTick;
     }
     $handler->setNextRun($nextRun);
     $this->tasks[$handler->getTaskId()] = $handler;
     $this->queue->insert($handler, $nextRun);
     return $handler;
 }
All Usage Examples Of pocketmine\scheduler\TaskHandler::setNextRun