pocketmine\Server::microSleep PHP Method

microSleep() public static method

public static microSleep ( integer $microseconds )
$microseconds integer
    public static function microSleep(int $microseconds)
    {
        Server::$sleeper->synchronized(function (int $ms) {
            Server::$sleeper->wait($ms);
        }, $microseconds);
    }

Usage Example

Example #1
0
 public function stop()
 {
     for ($n = 0; $n < $this->threads; ++$n) {
         $this->workers[$n]->close();
         Server::microSleep(50000);
         $this->workers[$n]->kill();
     }
     @socket_close($this->socket);
     $this->threads = 0;
 }
All Usage Examples Of pocketmine\Server::microSleep
Server