Interface IClock (4.8.0)

public interface IClock

An abstraction of the ability to determine the current date and time.

Namespace

Google.Api.Gax

Assembly

Google.Api.Gax.dll

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()

DateTime GetCurrentDateTimeUtc()

Returns the current date and time in UTC, with a kind of Utc.

Returns
Type Description
DateTime

A DateTime representing the current date and time in UTC.