TimeProvider
Provides an abstraction for time.
Gets a TimeProvider that provides a clock based on UtcNow,
a time zone based on Local, a high-performance time stamp based on Stopwatch,
and a timer based on Timer.
Gets a TimeZoneInfo object that represents the local time zone according to this TimeProvider's notion of time.
Gets the frequency of GetTimestamp of high-frequency value per second.
protected TimeProvider()
Initializes the TimeProvider.
public virtual ITimer CreateTimer(TimerCallback callback, object state, TimeSpan dueTime, TimeSpan period)
Gets the elapsed time between two timestamps retrieved using GetTimestamp.
Gets the elapsed time since the startingTimestamp value retrieved using GetTimestamp.
Gets a DateTimeOffset value that is set to the current date and time according to this TimeProvider's
notion of time based on GetUtcNow, with the offset set to the LocalTimeZone's offset from Coordinated Universal Time (UTC).
Gets the current high-frequency value designed to measure small time intervals with high accuracy in the timer mechanism.
Gets a DateTimeOffset value whose date and time are set to the current
Coordinated Universal Time (UTC) date and time and whose offset is Zero,
all according to this TimeProvider's notion of time.