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"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[[["This webpage provides documentation for the `IClock` interface, which is an abstraction for determining the current date and time within the `Google.Api.Gax` library for .NET."],["The `IClock` interface is primarily used for testing, allowing isolation from the system clock, with `SystemClock` being the standard production implementation."],["The `GetCurrentDateTimeUtc()` method within the `IClock` interface returns the current date and time in UTC, represented as a `DateTime` object."],["The latest version of `IClock` is 4.10.0, and the content provided also contains the documentation for versions 4.8.0, 4.4.0, 4.3.1, 4.2.0, 4.0.0, and 3.2.0."]]],[]]