am414
11/25/2019, 3:59 AMObservable<Integer> ob = Observable.timer(30,TimeUnit.SECONDS).just(1);
ob.subscribe(n-> System.out.println(n));Matthieu Esnault
11/25/2019, 5:24 AMObservable.just is static, so :
• Your statement doesn’t compile in Kotlin
• There is a warning in java that explains the problem
Observable.timer emits 0L and completes, so if you need a 1, you can :
• Observable.timer and then map the 0 to 1
• Observable.just 1 and delay the emission