Merge branch 'feat/action-scheduler' of Common/Utils into dev

This commit is contained in:
Chris Cameron
2018-07-13 15:52:53 +00:00
committed by Gogs

View File

@@ -99,7 +99,7 @@ namespace ICD.Common.Utils.Services.Scheduler
try try
{ {
actionsToRun = m_Actions actionsToRun = m_Actions
.Where(a => a.NextRunTime < DateTime.Now) .Where(a => a.NextRunTime < IcdEnvironment.GetLocalTime())
.OrderBy(a => a.NextRunTime) .OrderBy(a => a.NextRunTime)
.ToArray(); .ToArray();
} }
@@ -137,7 +137,7 @@ namespace ICD.Common.Utils.Services.Scheduler
return; return;
} }
long msToNextAction = (long)(action.NextRunTime.Value - DateTime.Now).TotalMilliseconds; long msToNextAction = (long)(action.NextRunTime.Value - IcdEnvironment.GetLocalTime()).TotalMilliseconds;
m_Timer.Reset(msToNextAction); m_Timer.Reset(msToNextAction);
} }
finally finally