Ejemplo n.º 1
0
 /**
  * @param TimerInterface $timer
  */
 public function add(TimerInterface $timer)
 {
     $interval = $timer->getInterval();
     $scheduledAt = $interval + $this->getTime();
     $this->timers->attach($timer, $scheduledAt);
     $this->scheduler->insert($timer, -$scheduledAt);
 }
Ejemplo n.º 2
0
 /**
  * Stop time register.
  *
  * @see ZmqModel::startTimeRegister
  */
 private function stopTimeRegister()
 {
     if ($this->rTimer !== null) {
         $this->rTimer->cancel();
         $this->rTimer = null;
         $this->connectionPool->resetNow();
     }
 }
Ejemplo n.º 3
0
 /**
  * @override
  * @inheritDoc
  */
 public function cancel()
 {
     $this->timer->cancel();
 }
Ejemplo n.º 4
0
 /**
  *
  */
 private function unregisterPeriodicTimers()
 {
     if ($this->reqsHelperTimer !== null) {
         $this->reqsHelperTimer->cancel();
     }
     if ($this->repsHelperTimer !== null) {
         $this->repsHelperTimer->cancel();
     }
 }