Closed artavd closed 8 years ago
Could get cool pausable observable:
Observable
.interval(period, TimeUnit.MILLISECONDS, scheduler)
.takeUntil(getStateFeed().filter(state -> state == DeviceState.STOPPED))
.repeatWhen(_unused_ -> getStateFeed().filter(state -> state == DeviceState.STARTED), scheduler)
Need to check on real use cases, not only on tests with TestScheduler.
Device emulator should be Device and DeviceController at the same time. It should have ability to work with several messages independently.