Class WaitFor
Some useful wait for methods to control program flow.
Inheritance
System.Object
WaitFor
Namespace: GDX.Threading
Syntax
public static class WaitFor
Fields
| Improve this Doc View SourceFiveSeconds
Five seconds worth of milliseconds.
Declaration
public const int FiveSeconds = 5000
Field Value
Type | Description |
---|---|
System.Int32 |
OneMinute
One minute worth of milliseconds.
Declaration
public const int OneMinute = 60000
Field Value
Type | Description |
---|---|
System.Int32 |
OneSecond
One second worth of milliseconds.
Declaration
public const int OneSecond = 1000
Field Value
Type | Description |
---|---|
System.Int32 |
TenMinutes
Ten minutes worth of milliseconds.
Declaration
public const int TenMinutes = 600000
Field Value
Type | Description |
---|---|
System.Int32 |
TenSeconds
Ten seconds worth of milliseconds.
Declaration
public const int TenSeconds = 10000
Field Value
Type | Description |
---|---|
System.Int32 |
ThirtySeconds
Thirty seconds worth of milliseconds.
Declaration
public const int ThirtySeconds = 30000
Field Value
Type | Description |
---|---|
System.Int32 |
TwoSeconds
Two seconds worth of milliseconds.
Declaration
public const int TwoSeconds = 2000
Field Value
Type | Description |
---|---|
System.Int32 |
Methods
| Improve this Doc View SourceGetEnumerator(Int32)
Wait using an System.Collections.IEnumerator.
Declaration
public static IEnumerator GetEnumerator(int milliseconds)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | milliseconds | The number of milliseconds to wait for. |
Returns
Type | Description |
---|---|
System.Collections.IEnumerator | Yields null values. |
GetTask(Int32)
Wait asynchronously.
Declaration
public static async Task GetTask(int milliseconds)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | milliseconds | The number of milliseconds to wait for. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |