public class FakeClock : IClock
Implementation of IClock which allows manually-specified times and increments.
Implements
IClockNamespace
Google Google.Api Gax TestingAssembly
Google.Api.Gax.Testing.dll
Remarks
This implementation is thread-safe.
Constructors
FakeClock()
public FakeClock()
Creates an instance with an initial time of 2000-01-01T00:00:00Z.
FakeClock(DateTime)
public FakeClock(DateTime dateTime)
Creates an instance with the specified initial time, which must have a kind of Utc or Unspecified (the latter being for convenience).
FakeClock(long)
public FakeClock(long ticks)
Creates an instance with the specified number of ticks since 0001-01-1T00:00:00Z as the initial time, for convenience when testing code with numeric values.
Methods
Advance(long)
public void Advance(long ticks)
Advances the clock by the given number of ticks.
Advance(TimeSpan)
public void Advance(TimeSpan timeSpan)
Advances the clock by the given time span.
AdvanceTo(DateTime)
public void AdvanceTo(DateTime dateTime)
Advances the clock to the given time.
GetCurrentDateTimeUtc()
public DateTime GetCurrentDateTimeUtc()
Returns the current date and time in UTC, with a kind of Utc .

