mirror of
https://github.com/ICDSystems/ICD.Common.Utils.git
synced 2026-04-12 12:07:05 +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()
|
public void Run()
|
||||||
{
|
{
|
||||||
RunFinal();
|
NextRunTimeUtc = RunFinal();
|
||||||
NextRunTimeUtc = GetNextRunTimeUtc();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void UpdateNextRunTime()
|
protected void UpdateNextRunTime()
|
||||||
{
|
{
|
||||||
NextRunTimeUtc = GetNextRunTimeUtc();
|
NextRunTimeUtc = GetNextRunTimeUtc();
|
||||||
}
|
}
|
||||||
|
|
@ -37,11 +36,11 @@ namespace ICD.Common.Utils.Services.Scheduler
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Runs when the action has hit its scheduled time
|
/// Runs when the action has hit its scheduled time
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public abstract void RunFinal();
|
protected abstract DateTime? RunFinal();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Runs after RunFinal in order to set the next run time of this action
|
/// Runs after RunFinal in order to set the next run time of this action
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public abstract DateTime? GetNextRunTimeUtc();
|
protected abstract DateTime? GetNextRunTimeUtc();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue