SHARE
TWEET

Untitled

a guest Jun 20th, 2019 58 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ScheduledExecutorService delayedExecutor = Executors.newSingleThreadScheduledExecutor();
  2. delayedExecutor.scheduleWithFixedDelay(storeStateTask, 60, 60, TimeUnit.SECONDS);
  3.      
  4. Robolectric.getBackgroundThreadScheduler().advanceBy(61, TimeUnit.SECONDS);
  5. Robolectric.getForegroundThreadScheduler().advanceBy(61, TimeUnit.SECONDS);
  6. Robolectric.flushForegroundThreadScheduler();
  7. Robolectric.flushBackgroundThreadScheduler();
  8. ShadowLooper.runUiThreadTasksIncludingDelayedTasks();
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top