PocketMine-MP 5.21.2 git-a6534ecbbbcf369264567d27e5ed70f7f5be9816
Loading...
Searching...
No Matches
pocketmine\scheduler\TaskScheduler Class Reference
+ Collaboration diagram for pocketmine\scheduler\TaskScheduler:

Public Member Functions

 __construct (private ?string $owner=null)
 
 cancelAllTasks ()
 
 isQueued (TaskHandler $task)
 
 mainThreadHeartbeat (int $currentTick)
 
 scheduleDelayedRepeatingTask (Task $task, int $delay, int $period)
 
 scheduleDelayedTask (Task $task, int $delay)
 
 scheduleRepeatingTask (Task $task, int $period)
 
 scheduleTask (Task $task)
 
 setEnabled (bool $enabled)
 
 shutdown ()
 

Protected Attributes

int $currentTick = 0
 
ReversePriorityQueue $queue
 
ObjectSet $tasks
 

Detailed Description

Definition at line 33 of file TaskScheduler.php.

Constructor & Destructor Documentation

◆ __construct()

pocketmine\scheduler\TaskScheduler::__construct ( private ?string $owner = null)

Definition at line 47 of file TaskScheduler.php.

Member Function Documentation

◆ cancelAllTasks()

pocketmine\scheduler\TaskScheduler::cancelAllTasks ( )

Definition at line 70 of file TaskScheduler.php.

◆ isQueued()

pocketmine\scheduler\TaskScheduler::isQueued ( TaskHandler $task)

Definition at line 80 of file TaskScheduler.php.

◆ mainThreadHeartbeat()

pocketmine\scheduler\TaskScheduler::mainThreadHeartbeat ( int $currentTick)

Definition at line 125 of file TaskScheduler.php.

◆ scheduleDelayedRepeatingTask()

pocketmine\scheduler\TaskScheduler::scheduleDelayedRepeatingTask ( Task $task,
int $delay,
int $period )

Definition at line 66 of file TaskScheduler.php.

◆ scheduleDelayedTask()

pocketmine\scheduler\TaskScheduler::scheduleDelayedTask ( Task $task,
int $delay )

Definition at line 58 of file TaskScheduler.php.

◆ scheduleRepeatingTask()

pocketmine\scheduler\TaskScheduler::scheduleRepeatingTask ( Task $task,
int $period )

Definition at line 62 of file TaskScheduler.php.

◆ scheduleTask()

pocketmine\scheduler\TaskScheduler::scheduleTask ( Task $task)

Definition at line 54 of file TaskScheduler.php.

◆ setEnabled()

pocketmine\scheduler\TaskScheduler::setEnabled ( bool $enabled)

Definition at line 121 of file TaskScheduler.php.

◆ shutdown()

pocketmine\scheduler\TaskScheduler::shutdown ( )

Definition at line 116 of file TaskScheduler.php.

Member Data Documentation

◆ $currentTick

int pocketmine\scheduler\TaskScheduler::$currentTick = 0
protected

Definition at line 45 of file TaskScheduler.php.

◆ $queue

ReversePriorityQueue pocketmine\scheduler\TaskScheduler::$queue
protected

@phpstan-var ReversePriorityQueue<int, TaskHandler>

Definition at line 37 of file TaskScheduler.php.

◆ $tasks

ObjectSet pocketmine\scheduler\TaskScheduler::$tasks
protected

Definition at line 43 of file TaskScheduler.php.


The documentation for this class was generated from the following file: