Ejemplo n.º 1
0
 /**
  *
  */
 private function stopTimeRegister()
 {
     if ($this->rTimer !== null) {
         $this->rTimer->cancel();
         $this->rTimer = null;
         $this->connectionPool->resetNow();
     }
 }
Ejemplo n.º 2
0
 /**
  * Schedule a timer for execution.
  *
  * @param TimerInterface $timer
  */
 private function scheduleTimer(TimerInterface $timer)
 {
     $flags = Event::TIMEOUT;
     if ($timer->isPeriodic()) {
         $flags |= Event::PERSIST;
     }
     $event = new Event($this->eventBase, -1, $flags, $this->timerCallback, $timer);
     $this->timerEvents[$timer] = $event;
     $event->add($timer->getInterval());
 }
Ejemplo n.º 3
0
 /**
  * @override
  */
 public function cancel()
 {
     $this->timer->cancel();
 }