Created
July 3, 2012 02:05
-
-
Save andersonimes/3037067 to your computer and use it in GitHub Desktop.
[Rx]Event rate smoothing operator called "StepInterval"
This file contains 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
//Source: http://stackoverflow.com/a/11285920/3244 | |
public static IObservable<T> StepInterval<T>(this IObservable<T> source, TimeSpan minDelay) | |
{ | |
return source.Select(x => | |
Observable.Empty<T>() | |
.Delay(minDelay) | |
.StartWith(x) | |
).Concat(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment