Table of Contents

Interface IClock<T>

Namespace
Virtufin.Core.Clock
Assembly
Virtufin.Core.dll

A clock is a stream of time values emitted as events. Each emission is a T (typically DateTimeOffset) representing a point in time. Subscribers receive emissions via Subscribe(IObserver<T>); callers should NOT poll the clock for a "current value".

public interface IClock<T> : IObservable<T> where T : struct, IComparable<T>

Type Parameters

T

The time representation emitted by the clock. Must be a struct so the implementation can use value-type semantics, and must implement IComparable<T> so consumers can order the emissions.

Inherited Members

Remarks

A clock is NOT a "now" provider — that abstraction is replaced by the observable stream. Concrete implementations include Metronome<T> (regular periodic emission) or the Metronome.CreateDateTimeWallClock factory (convenience for DateTimeOffset), both in Virtufin.Base.Clock. For "induced by actions" scenarios (e.g. backtest replay), the test driver emits via a System.Reactive.Subjects.Subject<T> cast to IClock<T>.