Class PrimeTestTimeBase
- Namespace
- KZDev.SystemClock.PrimeTime.Testing
- Assembly
- KZDev.SystemClock.PrimeTime.Testing.dll
BCL virtual-time storage and event args for PrimeTestTimeBase.
public abstract class PrimeTestTimeBase : IPrimeTestTime, IPrimeTime
- Inheritance
-
PrimeTestTimeBase
- Implements
- Derived
Properties
- IsRunning
Gets a value indicating whether the test clock's automatic runner is active.
Methods
- DelayAsync(int)
Creates a task that completes after a specified number of milliseconds.
- DelayAsync(int, CancellationToken)
Creates a task that completes after a specified number of milliseconds.
- DelayAsync(TimeSpan)
Creates a task that completes after a specified time interval.
- DelayAsync(TimeSpan, CancellationToken)
Creates a task that completes after a specified time interval.
- GetTimeCancellationToken(int)
Returns a disposable wrapper whose token expires after the specified time. The caller is responsible for disposing the returned instance when no longer needed.
- GetTimeCancellationToken(TimeSpan)
Returns a disposable wrapper whose token expires after the specified time. The caller is responsible for disposing the returned instance when no longer needed.
- LinkTimeCancellationToken(int, CancellationToken)
Returns a disposable wrapper whose token is cancelled when either the specified time elapses or the given cancellation token is cancelled. Disposing the returned instance disposes all underlying sources (including internal time-based sources). The caller is responsible for disposing the returned instance when no longer needed.
- LinkTimeCancellationToken(int, CancellationToken, CancellationToken)
Returns a disposable wrapper whose token is cancelled when the specified time elapses or any of the given tokens is cancelled. Disposing the returned instance disposes all underlying sources (including internal time-based sources). The caller is responsible for disposing the returned instance when no longer needed.
- LinkTimeCancellationToken(int, params CancellationToken[])
Returns a disposable wrapper whose token is cancelled when the specified time elapses or any of the given tokens is cancelled. Disposing the returned instance disposes all underlying sources (including internal time-based sources). The caller is responsible for disposing the returned instance when no longer needed.
- LinkTimeCancellationToken(TimeSpan, CancellationToken)
Returns a disposable wrapper whose token is cancelled when either the specified time elapses or the given cancellation token is cancelled. Disposing the returned instance disposes all underlying sources (including internal time-based sources). The caller is responsible for disposing the returned instance when no longer needed.
- LinkTimeCancellationToken(TimeSpan, CancellationToken, CancellationToken)
Returns a disposable wrapper whose token is cancelled when the specified time elapses or any of the given tokens is cancelled. Disposing the returned instance disposes all underlying sources (including internal time-based sources). The caller is responsible for disposing the returned instance when no longer needed.
- LinkTimeCancellationToken(TimeSpan, params CancellationToken[])
Returns a disposable wrapper whose token is cancelled when the specified time elapses or any of the given tokens is cancelled. Disposing the returned instance disposes all underlying sources (including internal time-based sources). The caller is responsible for disposing the returned instance when no longer needed.
- OnSchedulingMutatedWhileGateHeld()
Called while KZDev.SystemClock.PrimeTime.Testing.PrimeTestTimeBase.Gate is held when pending delays, time expiries, or their lists change in a way that can affect the automatic runner's next deadline.
- Sleep(int)
Suspends the current thread for the specified number of milliseconds.
- Sleep(TimeSpan)
Suspends the current thread for the specified amount of time.