- 시간 계산식 수정

- 보합 처리 추가
This commit is contained in:
2016-07-29 02:59:07 +09:00
parent 76e94dd4fc
commit b831b56934
6 changed files with 123 additions and 59 deletions

View File

@@ -115,14 +115,9 @@ namespace upper_limit_crawler
m_BlackList.Add(black);
}
bool IsIn5Min(int iTime1, int iTime2)
{
return DateTime.ParseExact(iTime1.ToString(), "HHmmss", null) > DateTime.ParseExact(iTime2.ToString(), "HHmmss", null) - TimeSpan.ParseExact("05", "mm", null);
}
public bool IsInBlackList(int iTime, string strCode)
{
return m_BlackList.Any(r => r.m_strCode == strCode && IsIn5Min(r.m_iTime, iTime));
return m_BlackList.Any(r => r.m_strCode == strCode && ULUtil.IsInTime(r.m_iTime, iTime, 5));
}
public Dictionary<string, ULWatchItem> GetWatchList()