pocketmine\scheduler\TaskHandler::getDelay PHP Method

getDelay() public method

public getDelay ( ) : integer
return integer
    public function getDelay()
    {
        return $this->delay;
    }

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;
 }