PocketMine-MP 5.23.3 git-fbaa125d0ce21ffef98fc1630881a92bedfbaa73
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 94 of file TaskScheduler.php.

◆ isQueued()

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

@phpstan-param TaskHandler<covariant Task> $task

Definition at line 107 of file TaskScheduler.php.

◆ mainThreadHeartbeat()

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

Definition at line 163 of file TaskScheduler.php.

◆ scheduleDelayedRepeatingTask()

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

@phpstan-template TTask of Task @phpstan-param TTask $task

@phpstan-return TaskHandler<TTask>

Definition at line 90 of file TaskScheduler.php.

◆ scheduleDelayedTask()

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

@phpstan-template TTask of Task @phpstan-param TTask $task

@phpstan-return TaskHandler<TTask>

Definition at line 70 of file TaskScheduler.php.

◆ scheduleRepeatingTask()

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

@phpstan-template TTask of Task @phpstan-param TTask $task

@phpstan-return TaskHandler<TTask>

Definition at line 80 of file TaskScheduler.php.

◆ scheduleTask()

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

@phpstan-template TTask of Task @phpstan-param TTask $task

@phpstan-return TaskHandler<TTask>

Definition at line 60 of file TaskScheduler.php.

◆ setEnabled()

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

Definition at line 159 of file TaskScheduler.php.

◆ shutdown()

pocketmine\scheduler\TaskScheduler::shutdown ( )

Definition at line 154 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<covariant Task>>

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: