Class SystemClock
A default clock implementation that wraps the System.DateTime.UtcNow and System.DateTime.Now properties.
Inheritance
System.Object
SystemClock
Implements
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Google.Apis.Util
Assembly: Google.Apis.Core.dll
Syntax
public class SystemClock : IClock
Constructors
SystemClock()
Constructs a new system clock.
Declaration
protected SystemClock()
Fields
Default
The default instance.
Declaration
public static readonly IClock Default
Field Value
Type | Description |
---|---|
IClock |
Properties
Now
Gets a System.DateTime object that is set to the current date and time on this computer, expressed as the local time.
Declaration
public DateTime Now { get; }
Property Value
Type | Description |
---|---|
System.DateTime |
UtcNow
Gets a System.DateTime object that is set to the current date and time on this computer, expressed as UTC time.
Declaration
public DateTime UtcNow { get; }
Property Value
Type | Description |
---|---|
System.DateTime |