Beispiel #1
0
 /**
  * Cancels timer
  */
 public function stop()
 {
     if ($this->timer && $this->timer->isActive()) {
         $this->timer->cancel();
     }
     $this->timer = null;
 }
Beispiel #2
0
 public function isRunning()
 {
     return $this->timer instanceof TimerInterface && $this->timer->isActive();
 }
 /**
  * @return bool
  */
 public function isActive()
 {
     return $this->timer->isActive();
 }