From Scribby Duck, 1 Year ago, written in Plain Text.
Embed
  1. public int getTimeToNextAttempt() {
  2.                 final int interval = (int) (25 * Math.pow(1.5, attempt));
  3.                 final int secondsSinceLast = (int) ((SystemClock.elapsedRealtime() - this.lastConnect) / 1000);
  4.                 return interval - secondsSinceLast;
  5.         }