private void tick() {
    long newNow = clock.now();
    Preconditions.checkState(!isTicking);
    isTicking = true;
    try {
      tickRemaining = newNow - now;
      now = newNow;
      do {
        tickRemaining = deltaQueue.tick(tickRemaining);
        runUntilIdle();
      } while (deltaQueue.isNotEmpty() && tickRemaining > 0);
      Preconditions.checkState(isTicking);
    } finally {
      isTicking = false;
      tickRemaining = 0;
    }
  }
Runs time forwards by a given duration, executing any commands scheduled for execution during
that time period, and any background tasks spawned by the scheduled tasks. Therefore, when a
call to tick returns, the executor will be idle.
imagepipeline-base-test/src/main/java/com/facebook/imagepipeline/testing/ScheduledQueue.java