private bool DeleteIfNeed(EntityBase et, Dictionary <string, bool> delDict) { bool rt = false; bool needDel = false; if (!delDict.ContainsKey(et.DbAccount)) { DateTime dateTime = Params.GetLatestCheckDbDeleteTime(et.DbAccount); needDel = (BatTime.Diff(Params.GetLatestSynOkTime(et.DbAccount)).TotalDays < 1.0 && (BatTime.Diff(dateTime).TotalDays > 2.0 || BatTime.Diff(dateTime).TotalMinutes < 10.0)); delDict[et.DbAccount] = needDel; Params.SaveLatestCheckDbDeleteTime(et.DbAccount); } else { needDel = delDict[et.DbAccount]; } if (needDel) { DateTime d = new DateTime(et.ModifyTick); rt = ((BatTime.Now - d).TotalDays > 3.0); } return(rt); }
private static void WaitForInit() { DateTime now = DateTime.Now; BatTime.WaitForInit(2000); }