private void start() {
    mState = State.IN_PROGRESS;
    if (mPresenter != null) {
      mPresenter.onStarted();
    }
    // Avoid blocking this thread on the Time Sync operation by invoking it on a different thread
    // (provided by mBackgroundExecutor) and posting the results back to this using
    // mCallbackFromBackgroundExecutor.
    ListenableFutureTask<Integer> getTimeCorrectionFuture =
        ListenableFutureTask.create(new Callable<Integer>() {
      @Override
      public Integer call() throws Exception {
        long timeCorrectionMillis =
            mNetworkTimeProvider.getNetworkTime() - mTotpClock.getSystemWallClock().nowMillis();
        final int timeCorrectionMinutes = (int) Math.round(
            ((double) timeCorrectionMillis) / Utilities.MINUTE_IN_MILLIS);
        return timeCorrectionMinutes;
      }
    });
    Futures.addCallback(
        getTimeCorrectionFuture,
        new FutureCallback<Integer>() {
          @Override
          public void onSuccess(Integer timeCorrectionMinutes) {
            onNewTimeCorrectionObtained(timeCorrectionMinutes);
          }

          @Override
          public void onFailure(Throwable e) {
            if (e instanceof IOException) {
              Log.w(LOG_TAG, "Failed to obtain network time due to connectivity issues");
              finish(Result.ERROR_CONNECTIVITY_ISSUE);
            } else {
              // Blow up
              throwIfUnchecked(e);
              throw new RuntimeException(e);
            }
          }
        },
        mCallbackFromBackgroundExecutor);

    mBackgroundExecutor.execute(getTimeCorrectionFuture);
  }
Starts this controller's operation (initiates a Time Sync).
java/com/google/android/apps/authenticator/timesync/SyncNowController.java