mirror of
https://github.com/ICDSystems/ICD.Common.Utils.git
synced 2026-04-12 03:57:32 +00:00
refactor : supporting feature where sleeptime changes due to a meeting.
This commit is contained in:
parent
878784586f
commit
e093a57172
1 changed files with 4 additions and 5 deletions
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue