Table of Contents

Class Metronome

Namespace
Virtufin.Base.Clock
Assembly
Virtufin.Base.dll

Helper factory methods for metronome-based clocks. Callers can write Metronome.CreateDateTimeWallClock(TimeSpan.FromSeconds(1)) without specifying a type argument.

public static class Metronome
Inheritance
Metronome
Inherited Members

Methods

CreateDateTimeWallClock(TimeSpan)

Convenience factory: create an IClock<DateTimeOffset> that emits DateTimeOffset.UtcNow every interval.

public static IClock<DateTimeOffset> CreateDateTimeWallClock(TimeSpan interval)

Parameters

interval TimeSpan

Time between emissions. Must be > Zero.

Returns

IClock<DateTimeOffset>

Exceptions

ArgumentOutOfRangeException

interval is <= Zero.