I'm running a timer using react\eventloop on my ratchet wamp app. I would like to have it run hourly at 3600 seconds, but for some reason if I set the interval higher than 2147 seconds I get this warning:
Warning: stream_select(): The microseconds parameter must be greater than 0 in C
:\wamp\www\vendor\react\event-loop\StreamSelectLoop.php on line 255
What's so special about 2147 seconds? And what can I do to bypass this contraint?
The Event Handler
class Pusher implements WampServerInterface, MessageComponentInterface {
private $loop;
}
public function __construct(LoopInterface $loop) {
$this->loop = $loop;
$this->loop->addPeriodicTimer(2147, function() {
//code
});
}
public function onSubscribe(ConnectionInterface $conn, $topic) {}
public function onUnSubscribe(ConnectionInterface $conn, $topic) {}
public function onOpen(ConnectionInterface $conn) {}
public function onClose(ConnectionInterface $conn) {}
public function onCall(ConnectionInterface $conn, $id, $topic, array $params) {}
public function onPublish(ConnectionInterface $conn, $topic, $event {}
public function onError(ConnectionInterface $conn, \Exception $e) {}
The Server
$loop = Factory::create();
$webSock = new Server($loop);
$webSock->listen(8080, '0.0.0.0');
new IoServer(
new HttpServer(
new WsServer(
new SessionProvider(
new WampServer(
new Pusher($loop)),
$sesshandler
)
)
),
$webSock
);
$loop->run();