Class SystemClock
A singleton implementation of IClock which delegates to the BCL System.DateTime.UtcNow property.
Inheritance
System.Object
SystemClock
Implements
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Google.Api.Gax
Assembly: Google.Api.Gax.dll
Syntax
public sealed class SystemClock : IClock
Properties
Instance
Retrieves the singleton instance of this type.
Declaration
public static IClock Instance { get; }
Property Value
Type | Description |
---|---|
IClock |
Methods
GetCurrentDateTimeUtc()
Returns the current date and time in UTC, using System.DateTime.UtcNow.
Declaration
public DateTime GetCurrentDateTimeUtc()
Returns
Type | Description |
---|---|
System.DateTime | The current date and time in UTC. |