20 lines
581 B
C#
20 lines
581 B
C#
using System;
|
|
|
|
namespace Common.Timer.Runtime
|
|
{
|
|
public interface IStopwatch : ITimer
|
|
{
|
|
public float Duration { get; set; }
|
|
public bool DeactivateOnTimeReached { get; set; }
|
|
public float RemainingTime { get; set; }
|
|
public float Progress { get; set; }
|
|
public bool IsTimeReached => CurrentTime >= Duration;
|
|
|
|
public event Action OnTimeReached;
|
|
|
|
public void SetDuration(float value);
|
|
public void SetRemainingTime(float value);
|
|
public void SetProgress(float value);
|
|
public void EndTime();
|
|
}
|
|
} |