Method Start
Start(TimeSpan, TimeSpan)
Starts a timer that measures time with System.
Declaration
public static RetryTimer Start(TimeSpan timeLimit, TimeSpan delay)
Parameters
| Type | Name | Description |
|---|---|---|
| TimeSpan | timeLimit | The time from now after which no more attempts are made. Must be at least zero, or InfiniteTimeSpan to retry until a wait is canceled. |
| TimeSpan | delay | The time to wait between two attempts. Must be greater than zero and at most MaxValue milliseconds. |
Returns
| Type | Description |
|---|---|
| RetryTimer |
Exceptions
| Type | Condition |
|---|---|
| ArgumentOutOfRangeException |
|
Start(TimeSpan, TimeSpan, TimeProvider)
Starts a timer that measures time with the specified time provider.
Declaration
public static RetryTimer Start(TimeSpan timeLimit, TimeSpan delay, TimeProvider timeProvider)
Parameters
| Type | Name | Description |
|---|---|---|
| TimeSpan | timeLimit | The time from now after which no more attempts are made. Must be at least zero, or InfiniteTimeSpan to retry until a wait is canceled. |
| TimeSpan | delay | The time to wait between two attempts. Must be greater than zero and at most MaxValue milliseconds. |
| TimeProvider | timeProvider | The time provider that measures the time limit and the waits. |
Returns
| Type | Description |
|---|---|
| RetryTimer |
Exceptions
| Type | Condition |
|---|---|
| ArgumentOutOfRangeException |
|