Class SystemClock (1.55.0)

public class SystemClock : IClock

A default clock implementation that wraps the UtcNow and Now properties.

Inheritance

Object > SystemClock

Implements

IClock

Namespace

Google.Apis.Util

Assembly

Google.Apis.Core.dll

Constructors

SystemClock()

protected SystemClock()

Constructs a new system clock.

Fields

Default

public static readonly IClock Default

The default instance.

Field Value
TypeDescription
IClock

Properties

Now

public DateTime Now { get; }

Gets a DateTime object that is set to the current date and time on this computer, expressed as the local time.

Property Value
TypeDescription
DateTime

UtcNow

public DateTime UtcNow { get; }

Gets a DateTime object that is set to the current date and time on this computer, expressed as UTC time.

Property Value
TypeDescription
DateTime

Extension Method