private function __construct($name, $cb) { if (!is_callable($cb)) { return false; } if ($name == '') { $name = 'tEv_' . Daemon::getNextTimerEventId(); } $this->name = $name; $this->cb = $cb; $this->ev = event_new(); event_set($this->ev, STDIN, EV_TIMEOUT, array(__CLASS__, 'eventCall'), array($name)); event_base_set($this->ev, Daemon::$eventBase); Daemon::$timerEventPool[$name] = $this; }