private static void Security() { while (true) { logger.Log(LogLevel.Info, string.Format("开始启动安全心跳!")); SecurityBill.AnalysisBlackList(); logger.Log(LogLevel.Info, string.Format("结束安全心跳!")); Thread.Sleep(60000); } ; }
public static void RunSecurity() { try { SecurityBill.LoadBlackList(); Thread t = new Thread(new ThreadStart(Security)); t.Start(); } catch (Exception ex) { logger.Log(LogLevel.Error, string.Format("启动安全心跳失败,原因:{0}...", ex.Message)); } }