Show / Hide Table of Contents

Class SystemClock

A default clock implementation that wraps the and properties.

Inheritance
System.Object
SystemClock
Implements
IClock
Namespace: Google.Apis.Util
Assembly: Google.Apis.Core.dll
Syntax
public class SystemClock : object, 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

Implements

IClock

Extension Methods

Utilities.ThrowIfNull<T>(T, String)
Back to top