checkPrecision() public static method

Changes the Precision for PHP configs that default to less than 16
public static checkPrecision ( )
示例#1
0
 /**
  * Constructor
  *
  * @param \React\EventLoop\LoopInterface $loop
  */
 public function __construct(LoopInterface $loop = null)
 {
     Utils::checkPrecision();
     $this->loop = $loop ?: Factory::create();
     $this->realmManager = new RealmManager();
     $this->eventDispatcher = new EventDispatcher();
     $this->eventDispatcher->addSubscriber($this);
     $this->registerModule($this->realmManager);
     Logger::debug($this, "New router created");
 }
示例#2
0
文件: Client.php 项目: voryx/thruway
 /**
  * Constructor
  *
  * @param string $realm
  * @param \React\EventLoop\LoopInterface $loop
  */
 public function __construct($realm, LoopInterface $loop = null)
 {
     Utils::checkPrecision();
     $this->realm = $realm;
     $this->loop = $loop ? $loop : Factory::create();
     $this->transportProvider = null;
     $this->roles = [];
     $this->authMethods = [];
     $this->session = null;
     $this->clientAuthenticators = [];
     $this->authId = "anonymous";
     $this->reconnectOptions = ["max_retries" => 15, "initial_retry_delay" => 1.5, "max_retry_delay" => 300, "retry_delay_growth" => 1.5, "retry_delay_jitter" => 0.1];
     $this->on('open', [$this, 'onSessionStart']);
     Logger::info($this, "New client created");
 }