/** * Init. * @return void */ public static function init($event = null) { if ($event) { self::$_event = $event; } else { pcntl_signal(SIGALRM, array('\\Workerman\\Lib\\Timer', 'signalHandle'), false); } }
/** * 初始化 * @return void */ public static function init($event = null) { if ($event) { self::$_event = $event; } else { echo new Exception("bad timer"); } }