IClock Type
Abstraction over system clock for testable time-dependent code.
let clock = SystemClock.Instance
let now = clock.UtcNow
// In tests:
let fake = FakeClock(DateTimeOffset(2024, 1, 1, 0, 0, 0, TimeSpan.Zero))
fake.Advance(TimeSpan.FromHours 1.)
Instance members
| Instance member |
Description
|
|
Gets the current UTC date and time.
|
TDesu.FSharp