refactor: UpdateRunTime -> GetNextRunTime, add UpdateRunTime for caching GetNextRunTime value

- also swap the operands on the delta time calculation
This commit is contained in:
Jeffery Thompson
2018-07-12 15:09:52 -04:00
parent c25a82399d
commit a46987aabf
2 changed files with 8 additions and 3 deletions

View File

@@ -137,7 +137,7 @@ namespace ICD.Common.Utils.Services.Scheduler
return;
}
long msToNextAction = (long)(DateTime.Now - action.NextRunTime.Value).TotalMilliseconds;
long msToNextAction = (long)(action.NextRunTime.Value - DateTime.Now).TotalMilliseconds;
m_Timer.Reset(msToNextAction);
}
finally