private void CheckForNewSessions(string stTime) { //TODO from global variable, from config //int mscOffset = -2; DateTime dt = CASTSConv.ASTSTimeToDateTime(stTime); DateTime dtBegin = GetSessionStartNormalTime(); DateTime dtEnd = GetSessionEndNormalTime(); int tolMs = 2000; if (CUtilTime.IsEqual(dt, dtBegin, tolMs)) { _currSession = new CDBSession { DtBegin = dtBegin, DtEnd = dtEnd, stock_exchange_id = _client.StockExchId }; _lstSessions.Add(_currSession); } CUtil.TaskStart(InsertUnsavedSessions); }