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.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-04 UTC."],[[["This page provides documentation for the `IClock` interface, which abstracts the ability to determine the current date and time."],["The `IClock` interface is primarily used for testing, allowing isolation from the system clock, with `SystemClock` being the most common implementation in production."],["The `IClock` interface resides within the `Google.Api.Gax` namespace, in the `Google.Api.Gax.dll` assembly."],["The interface contains one method, `GetCurrentDateTimeUtc()`, which returns the current date and time in UTC."],["Multiple versions of the `IClock` interface are accessible, ranging from version 3.2.0 up to the latest, 4.10.0."]]],[]]