コード例 #1
0
 /// <summary>
 /// Creates an operation that completes after a time delay.
 /// </summary>
 /// <param name="delay">The time span to wait before completing the returned operation, or <c>TimeSpan.FromMilliseconds(-1)</c> to wait indefinitely.</param>
 /// <exception cref="ArgumentOutOfRangeException">Thrown if the <paramref name="delay"/> represents a negative time interval other than <c>TimeSpan.FromMillseconds(-1)</c>.</exception>
 /// <returns>An operation that represents the time delay.</returns>
 /// <seealso cref="Delay(int)"/>
 /// <seealso cref="Delay(float)"/>
 public static IAsyncOperation Delay(TimeSpan delay)
 {
     return(AsyncResult.Delay(delay, _rootBehaviour.UpdateSource));
 }
コード例 #2
0
 /// <summary>
 /// Creates an operation that completes after a time delay.
 /// </summary>
 /// <param name="secondsDelay">The number of seconds to wait before completing the returned operation, or -1 to wait indefinitely.</param>
 /// <exception cref="ArgumentOutOfRangeException">Thrown if the <paramref name="secondsDelay"/> is less than -1.</exception>
 /// <returns>An operation that represents the time delay.</returns>
 /// <seealso cref="Delay(int)"/>
 /// <seealso cref="Delay(TimeSpan)"/>
 public static IAsyncOperation Delay(float secondsDelay)
 {
     return(AsyncResult.Delay(secondsDelay, _rootBehaviour.UpdateSource));
 }