I am replacing timers on rx's Observable.Interval and I encountered a problem. I don't know how to pause such timer. I don't mean pause subscription, but pausing and resuming time counting. I know how to do this in dirty way, but I would like know maybe nicer solution.
My current code:
var RemainingTimes = Observable
.Interval(TimeSpan.FromMilliseconds(refreshInterval))
.Select(t => _provider.Duration - TimeSpan.FromMilliseconds(t * refreshInterval))