コード例 #1
0
ファイル: EventTimer.php プロジェクト: omgnull/php-libevent
 /**
  * Remove an event from the set of monitored events.
  *
  * @see event_del
  *
  * @param bool $baseCall To prevent infinite loop
  *
  * @throws EventException if can't delete event
  *
  * @return bool
  */
 protected function remove($baseCall)
 {
     if (false === event_timer_del($this->resource)) {
         throw $this->exception('Could not delete event (event_timer_del).');
     }
     if (false === $baseCall) {
         $this->base->disableEvent($this->name);
     }
     return true;
 }
コード例 #2
0
ファイル: Timer.php プロジェクト: ruslanchek/phpdaemon
 public function free()
 {
     unset(Timer::$list[$this->id]);
     if (is_resource($this->ev)) {
         event_timer_del($this->ev);
         event_free($this->ev);
     }
 }