-
-
Save Siliconrob/a9cafc9a45131c431c83f1acc9af519d to your computer and use it in GitHub Desktop.
Count up from 0 to {count}, showing an item every {delay} milliseconds
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public IObservable<int> ObservableCounter(int count, int delay) | |
{ | |
return Observable.Range(0, count).Zip( | |
Observable.Interval(TimeSpan.FromMilliseconds(delay)), (item, _) => item); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment