getStatus()
/**
* @param string|int $name
* @return StatusThread|null
*
* This method is used to get the status of a green thread.
*/
public static function getStatus(string|int $name): StatusThread|null;
This is the static method used to get the current state of a thread.
/**
* @return int|float
*
* This method is used to get the time sleeping.
*/
public function getTimeSleeping(): int|float;
/**
* @return int|float
*
* This method is used to get the sleep start time.
*/
public function getSleepStartTime(): int|float;
/**
* @param int|float $seconds
*
* This method is used to sleep the thread.
*/
public function sleep(int|float $seconds): void;
/**
* @return bool
*
* This method is used to check if the thread can wake up.
*/
public function canWakeUp(): bool;
Last updated