Home | History | Annotate | Download | only in common

Lines Matching refs:time

20 import android.text.format.Time;
142 * Compute the time of the next operation. Does not modify any state
146 * @return the wall clock time ({@link System#currentTimeMillis()}) when the
148 * before the current time.
159 // clipped to the current time so we don't languish forever.
170 long time = triggerTimeMillis;
172 time = Math.min(time, lastSuccessTimeMillis + options.periodicIntervalMillis);
175 time = Math.max(time, moratoriumTimeMillis);
176 time = Math.max(time, lastSuccessTimeMillis + options.minTriggerMillis);
186 // Treat backoff like a moratorium: don't let the backoff time grow too large.
189 time = Math.max(time, lastErrorTimeMillis + backoff);
191 return time;
195 * Return the last time the operation completed. Does not modify any state.
197 * @return the wall clock time when {@link #onSuccess()} was last called.
204 * Return the last time the operation was attempted. Does not modify any state.
206 * @return the wall clock time when {@link #onSuccess()} or {@link
217 * a certain time, updating the value if necessary. This is to recover
221 * @param max time to allow in result
225 long time = mStorage.getLong(name, 0);
226 if (time > max) {
227 time = max;
228 SharedPreferencesCompat.apply(mStorage.edit().putLong(name, time));
230 return time;
234 * Request an operation to be performed at a certain time. The actual
235 * scheduled time may be affected by error backoff logic and defined
238 * @param millis wall clock time ({@link System#currentTimeMillis()}) to
247 * Forbid any operations until after a certain (absolute) time.
250 * @param millis wall clock time ({@link System#currentTimeMillis()})
260 * Forbid any operations until after a certain time, as specified in
264 * @param retryAfter moratorium time in HTTP format
265 * @return true if a time was successfully parsed
311 * the error count and records the time of the latest error for backoff
360 Time time = new Time();
361 time.set((Long) e.getValue());
363 out.append("=").append(time.format("%Y-%m-%d/%H:%M:%S"));
379 * Gets the current time. Can be overridden for unit testing.