Whats the easiest way to Select items for a duration from a Hot observable ?
Here is currently what I came up with. I am sure there are some extensions that I could use
Stopwatch stopwatch = new Stopwatch();
IObservable<MyObj> hotObservable= GetObservable();
Subject<MyObj> newObservable= new Subject<MyObj>();
bool finished = false;
bars.Subscribe(a => newObservable.OnNext(a), () =>finished = true);
while (!finished && stopwatch.Elapsed < TimeSpan.FromSeconds(10))
This is what I got
TimeSpan duration = TimeSpan.FromSeconds(5);
var newObservable = observable
.TakeUntil(DateTime.Now + duration);
Microsoft is conducting an online survey to understand your opinion of the Msdn Web site. If you choose to participate, the online survey will be presented to you when you leave the Msdn Web site.
Would you like to participate?