Rxjava从入门到精通:Rxjava操作符ObservableTime 定时器使用

1: ObservableTime :定时器Observable

Observable.timer(2,TimeUnit.SECONDS).observeOn(AndroidSchedulers.mainThread())
                .subscribe(new Observer() {
            @Override
            public void onSubscribe(Disposable d) {
            }

            @Override
            public void onNext(Long aLong) {
            }

            @Override
            public void onError(Throwable e) {
            }

            @Override
            public void onComplete() {

            }
        });

你可能感兴趣的:(#,Android基础,进阶,核心技术,rxjava)