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