Class FastDateTime
Provides a cached UTC clock for hot paths, refreshed at most once per Precision.
public static class FastDateTime
- Inheritance
-
FastDateTime
- Inherited Members
Properties
Precision
Gets or sets how often, by the tick count, the cached time is refreshed. The default is 1 second.
public static TimeSpan Precision { get; set; }
Property Value
UtcNow
Gets the cached UTC time, refreshed from the system clock once Precision has passed by the tick count. A read between refreshes takes no lock, refreshes are serialized, and a change of the system clock shows at the next refresh.
public static DateTime UtcNow { get; }