Skip to content

Instantly share code, notes, and snippets.

@Siliconrob
Forked from davidfowl/DelayCounter.cs
Created June 3, 2017 20:04

Revisions

  1. @davidfowl davidfowl revised this gist Jun 3, 2017. No changes.
  2. @davidfowl davidfowl revised this gist Jun 3, 2017. No changes.
  3. @davidfowl davidfowl created this gist Jun 3, 2017.
    5 changes: 5 additions & 0 deletions DelayCounter.cs
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,5 @@
    public IObservable<int> ObservableCounter(int count, int delay)
    {
    return Observable.Range(0, count).Zip(
    Observable.Interval(TimeSpan.FromMilliseconds(delay)), (item, _) => item);
    }