title: How can I improve thread.sleep in Observable
body: <p>I want to improve the sleep inside the observable's doOnNext block. </p>
  
  <p>Recommend if there is a better way.</p>
  
  <pre><code>Observable.from(sampleList)
                  .buffer(5)
                  .doOnNext(first -&gt; {
                      // first Logic
                      try {
                          Thread.sleep(500);
                      } catch (InterruptedException e) {}
                  })
                  .buffer(2)
                  .doOnNext(second -&gt; {
                      // second Logic
                      try {
                          Thread.sleep(500);
                      } catch (InterruptedException e) {}
                  })
                  .buffer(2)
                  .doOnNext(third -&gt; {
                      // third Logic
                      try {
                          Thread.sleep(500);
                      } catch (InterruptedException e) {}
                  })
                  .subscribe();
  </code></pre>