forked from aly/qstbak
muffin v7.5.12
This commit is contained in:
parent
3102923ce2
commit
911ed68baa
65 changed files with 2356 additions and 1539 deletions
5
Questionable/Questionable.Controller.Steps/IDutyTask.cs
Normal file
5
Questionable/Questionable.Controller.Steps/IDutyTask.cs
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
namespace Questionable.Controller.Steps;
|
||||
|
||||
internal interface IDutyTask : ITask
|
||||
{
|
||||
}
|
||||
|
|
@ -16,6 +16,8 @@ internal interface ITaskExecutor
|
|||
|
||||
bool WasInterrupted();
|
||||
|
||||
void ResetTimeout();
|
||||
|
||||
bool HasTimedOut(float timeoutSeconds);
|
||||
|
||||
ETaskResult Update();
|
||||
|
|
|
|||
|
|
@ -32,6 +32,11 @@ internal abstract class TaskExecutor<T> : ITaskExecutor where T : class, ITask
|
|||
return Environment.TickCount64 - _lastProgressAt > (long)(timeoutSeconds * 1000f);
|
||||
}
|
||||
|
||||
public virtual void ResetTimeout()
|
||||
{
|
||||
ResetProgressTimer();
|
||||
}
|
||||
|
||||
protected void ResetProgressTimer()
|
||||
{
|
||||
_lastProgressAt = Environment.TickCount64;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue