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