Added summary for TaskExecutor, TaskManager, TrangaTask

This commit is contained in:
2023-05-19 20:03:17 +02:00
parent c1a3532a6c
commit 124c644db1
3 changed files with 63 additions and 0 deletions

View File

@ -2,6 +2,9 @@
namespace Tranga;
/// <summary>
/// Stores information on Task
/// </summary>
public class TrangaTask
{
public TimeSpan reoccurrence { get; }
@ -24,6 +27,10 @@ public class TrangaTask
this.language = language;
}
/// <summary>
///
/// </summary>
/// <returns>True if elapsed time since last execution is greater than set interval</returns>
public bool ShouldExecute()
{
return DateTime.Now.Subtract(this.lastExecuted) > reoccurrence;