Table of Contents

Interface ITimeoutTimer

Namespace
Acuit.Pinpoint.Timing
Assembly
Acuit.Pinpoint.Timing.Abstractions.dll

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

TimeSpan

IsExpired

Gets whether the timeout duration has expired.

bool IsExpired { get; }

Property Value

bool

Stopwatch

Gets the underlying IStopwatch used to measure elapsed time.

IStopwatch Stopwatch { get; }

Property Value

IStopwatch

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

TimeSpan

Methods

ThrowIfExpired()

Throws a TimeoutException if the timeout timer has expired.

void ThrowIfExpired()

Exceptions

TimeoutException

The timeout has expired.