//Thread.Sleep(1000 * 60);
//DateTime getDataTime = DateTime.Now;
//if (getDataTime >= new DateTime(getDataTime.Year, getDataTime.Month, getDataTime.Day)
// && getDataTime <= DateTime.Parse(getDataTime.ToString("yyyy-MM-dd 12:00:00")))
//{
// log.Info("事件:" + "读数中。。。");
// CoreGetData();
// log.Info("事件:" + "服务睡眠中0");
// Thread.Sleep(1000*60*3);
//}
while (StopFlag)
{
// DateTime LastGetKaoQinDataTime = DateTime.Parse("2014-01-09 01:01:00");
DateTime getDataTime = DateTime.Now;
DateTime LastGetKaoQinDataTime = new DateTime(getDataTime.Year, getDataTime.Month, getDataTime.Day);
DateTime CurrentKaoQinDateTime = DateTime.Now;
TimeSpan timeSpan = CurrentKaoQinDateTime - LastGetKaoQinDataTime;
if (timeSpan.Seconds>=10 )
{
log.Info("事件:" + "读数中。。。");
CoreGetData();
log.Info("事件:" + "服务睡眠中0");
Thread.Sleep(1000*60*1);
}