4.10.0 (latest) 4.8.0 4.4.0 4.3.1 4.2.0 4.0.0 3.2.0

    public interface IClock

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

## Namespace

[Google.Api.Gax](https://docs.cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.md.txt)

## 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](https://docs.cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.SystemClock.md.txt)
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](https://docs.cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.SystemClock.md.txt#Google_Api_Gax_SystemClock_Instance).

## Methods

### GetCurrentDateTimeUtc()

    DateTime GetCurrentDateTimeUtc()

Returns the current date and time in UTC, with a kind of [Utc](https://learn.microsoft.com/dotnet/api/system.datetimekind#system-datetimekind-utc).

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `DateTime` | A [DateTime](https://learn.microsoft.com/dotnet/api/system.datetime) representing the current date and time in UTC. |