public bool startup() { executor.start(); //延迟2秒执行,每5秒调度一次 executor.scheduleExecute(this, 2 * TimeUtil.SECOND, 5 * TimeUtil.SECOND); return(true); }
public bool initialize() { #if !UseTimer //分配1个线程 _ScheduleExecutor = new ScheduleExecutor(1); //加入循环任务 _PeriodicTaskHandle = _ScheduleExecutor.scheduleExecute(this, 0L, 100); #else ScheduleExecutor2.Instance.scheduleExecute(this, 0, 30000); #endif return(true); }
public bool initialize() { //分配2个线程 _ScheduleExecutor = new ScheduleExecutor(2); //加入循环任务 _PeriodicTaskHandle = _ScheduleExecutor.scheduleExecute(this, 0L, 100); DailyPushMsgDayID = -1; //测试推送消息 //GetuiServerApiSDK.PushMessageToSingle("cf4a0d426a757a391570280e27eea097", "服务器端测试", "服务器端测试消息是否能够发送"); return(true); }