mirror of
https://github.com/ICDSystems/ICD.Common.Utils.git
synced 2026-01-11 19:44:55 +00:00
refactor : supporting feature where sleeptime changes due to a meeting.
This commit is contained in:
committed by
Chris Cameron
parent
878784586f
commit
e093a57172
@@ -25,11 +25,10 @@ namespace ICD.Common.Utils.Services.Scheduler
|
||||
|
||||
public void Run()
|
||||
{
|
||||
RunFinal();
|
||||
NextRunTimeUtc = GetNextRunTimeUtc();
|
||||
NextRunTimeUtc = RunFinal();
|
||||
}
|
||||
|
||||
public void UpdateNextRunTime()
|
||||
protected void UpdateNextRunTime()
|
||||
{
|
||||
NextRunTimeUtc = GetNextRunTimeUtc();
|
||||
}
|
||||
@@ -37,11 +36,11 @@ namespace ICD.Common.Utils.Services.Scheduler
|
||||
/// <summary>
|
||||
/// Runs when the action has hit its scheduled time
|
||||
/// </summary>
|
||||
public abstract void RunFinal();
|
||||
protected abstract DateTime? RunFinal();
|
||||
|
||||
/// <summary>
|
||||
/// Runs after RunFinal in order to set the next run time of this action
|
||||
/// </summary>
|
||||
public abstract DateTime? GetNextRunTimeUtc();
|
||||
protected abstract DateTime? GetNextRunTimeUtc();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user