Exemplo n.º 1
0
 public static IAsyncEnumerable <long> IntervalAsync(this IMomentClock clock, IEnumerable <TimeSpan> intervals)
 => clock.Interval(intervals).ToAsyncEnumerable();
Exemplo n.º 2
0
 public static IObservable <long> Interval(this IMomentClock clock, TimeSpan interval)
 => clock is SystemClock
         ? Observable.Interval(interval) // Perf. optimization
         : clock.Interval(Intervals.Fixed(interval));
Exemplo n.º 3
0
 public static IAsyncEnumerable <long> IntervalAsync(this IMomentClock clock, long intervalInMilliseconds)
 => clock.Interval(intervalInMilliseconds).ToAsyncEnumerable();
Exemplo n.º 4
0
 public static IObservable <long> Interval(this IMomentClock clock, long intervalInMilliseconds)
 => clock.Interval(TimeSpan.FromMilliseconds(intervalInMilliseconds));