DotNext by Roman Sakno

<PackageReference Include="DotNext" Version="0.5.1" />

 Timeout

public struct Timeout
Helps to compute timeout for asynchronous operations.
public bool Expired { get; }

Indicates that timeout is reached.

public Timeout(TimeSpan timeout)

Constructs a new timeout control object.

public static bool op_False(ref Timeout timeout)

Indicates that timeout is not reached.

public static TimeSpan op_Implicit(ref Timeout timeout)

Extracts original timeout value from this object.

public static bool op_True(ref Timeout timeout)

Indicates that timeout is reached.

public void ThrowIfExpired()

Throws TimeoutException if timeout occurs.