Guest User

Untitled

a guest
Dec 13th, 2017
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. @Query("SELECT * FROM conversations")
  2. Flowable<List<ConversationItem>> getConversations();
  3.  
  4. conversationsDatabase.getConversations()
  5. .observeOn(AndroidSchedulers.mainThread())
  6. .subscribeOn(Schedulers.io())
  7. .subscribe(conversations -> {
  8. long endTime = System.nanoTime();
  9. long duration = (endTime - startTime);
  10. Timber.d("load conversation time: " + duration);
  11. });
Add Comment
Please, Sign In to add comment