Interface ITimeoutTimer
A timeout timer.
public interface ITimeoutTimer
Properties
Duration
Gets the total timeout duration, or InfiniteTimeSpan if the timer will never time out.
TimeSpan Duration { get; }
Property Value
IsExpired
Gets whether the timeout duration has expired.
bool IsExpired { get; }
Property Value
Stopwatch
Gets the underlying IStopwatch used to measure elapsed time.
IStopwatch Stopwatch { get; }
Property Value
TimeLeft
Gets the time left in the timer, or Zero if the timeout duration has expired, or InfiniteTimeSpan if the timer will never time out.
TimeSpan TimeLeft { get; }
Property Value
Methods
ThrowIfExpired()
Throws a TimeoutException if the timeout timer has expired.
void ThrowIfExpired()
Exceptions
- TimeoutException
The timeout has expired.