Header menu logo TDesu.FSharp

FakeClock Type

Fake clock for testing. Allows manual time control. Not thread-safe.

Constructors

Constructor Description

FakeClock()

Full Usage: FakeClock()

Returns: FakeClock

Creates a FakeClock starting at the current UTC time.

Returns: FakeClock

FakeClock(startTime)

Full Usage: FakeClock(startTime)

Parameters:
Returns: FakeClock
startTime : DateTimeOffset
Returns: FakeClock

Instance members

Instance member Description

this.Advance

Full Usage: this.Advance

Parameters:

Advance the clock by the given duration. The amount of time to advance.

duration : TimeSpan

this.Current

Full Usage: this.Current

Returns: DateTimeOffset

Current fake time.

Returns: DateTimeOffset

this.Set

Full Usage: this.Set

Parameters:

Set the clock to a specific time. The time to set.

time : DateTimeOffset

Type something to start searching.