Interface IClock
An abstraction of the ability to determine the current date and time.
Namespace: Google.Api.Gax
Assembly: Google.Api.Gax.dll
Syntax
public interface IClock
Remarks
This interface primarily exists for testing purposes, allowing test code to isolate itself from the system clock. In production, the SystemClock implementation is by far the most likely one to be used, and the only one provided within this library. Code that uses a clock should generally be designed to allow it to be optionally specified, defaulting to Instance.
Methods
GetCurrentDateTimeUtc()
Returns the current date and time in UTC, with a kind of System.DateTimeKind.Utc.
Declaration
DateTime GetCurrentDateTimeUtc()
Returns
Type | Description |
---|---|
System.DateTime | A System.DateTime representing the current date and time in UTC. |