mirror of
https://github.com/C9Glax/tranga.git
synced 2025-07-03 09:24:16 +02:00
SettingsController.cs SearchController.cs QueryController.cs NotificationConnectorController.cs MetadataFetcherController.cs MangaConnectorController.cs FileLibraryController LibraryConnectors WorkerController
9 lines
274 B
C#
9 lines
274 B
C#
namespace API.Workers;
|
|
|
|
public interface IPeriodic
|
|
{
|
|
protected DateTime LastExecution { get; set; }
|
|
public TimeSpan Interval { get; set; }
|
|
public DateTime NextExecution => LastExecution.Add(Interval);
|
|
public bool IsDue => NextExecution <= DateTime.UtcNow;
|
|
} |