This commit is contained in:
celestora 2022-10-11 19:12:00 +03:00
commit e95ea71c67

View file

@ -64,10 +64,10 @@ class SignalManager
* @uses \Chandler\Signaling\SignalManager::eventFor * @uses \Chandler\Signaling\SignalManager::eventFor
* @return void * @return void
*/ */
function listen(\Closure $callback, int $for): void function listen(\Closure $callback, int $for, int $time = 25): void
{ {
$this->since = time() - 1; $this->since = time() - 1;
for($i = 0; $i < 25; $i++) { for($i = 0; $i < $time; $i++) {
sleep(1); sleep(1);
$event = $this->eventFor($for); $event = $this->eventFor($for);