mirror of
https://github.com/C9Glax/tranga.git
synced 2025-09-10 20:08:19 +02:00
WIP
This commit is contained in:
9
API/Workers/IPeriodic.cs
Normal file
9
API/Workers/IPeriodic.cs
Normal file
@@ -0,0 +1,9 @@
|
||||
namespace API.Workers;
|
||||
|
||||
public interface IPeriodic<T> where T : BaseWorker
|
||||
{
|
||||
protected DateTime LastExecution { get; set; }
|
||||
protected TimeSpan Interval { get; set; }
|
||||
|
||||
public DateTime NextExecution => LastExecution.Add(Interval);
|
||||
}
|
Reference in New Issue
Block a user