Class SystemClock
Uses the system clock to calculate time for timeouts.
public class SystemClock : IClock
- Inheritance
-
SystemClock
- Implements
- Inherited Members
Properties
Instance
An instance of the SystemClock type.
public static SystemClock Instance { get; }
Property Value
Now
Gets the current date and time values.
public DateTime Now { get; }
Property Value
Methods
IsNowBefore(DateTime)
Gets a value indicating whether the current date and time is before the specified date and time.
public bool IsNowBefore(DateTime otherDateTime)
Parameters
otherDateTime
DateTimeThe date and time values to compare the current date and time values to.
Returns
LaterBy(TimeSpan)
Calculates the date and time values after a specific delay.
public DateTime LaterBy(TimeSpan delay)
Parameters
delay
TimeSpanThe delay after to calculate.
Returns
- DateTime
The future date and time values.