Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a8cf4f2f authored by David Christie's avatar David Christie
Browse files

Document that Handler.postDelayed uses uptimeMillis() based counting.

-Make it clear that delay may be longer than requested.
-Potentially help developers avoid power bugs (e.g. releasing after delay).
Bug: 12015795

Change-Id: I8034466f6307f64bfcad985948c1dc06872297d3
parent 3bc26143
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -330,6 +330,7 @@ public class Handler {
     * Causes the Runnable r to be added to the message queue, to be run
     * at a specific time given by <var>uptimeMillis</var>.
     * <b>The time-base is {@link android.os.SystemClock#uptimeMillis}.</b>
     * Time spent in deep sleep will add an additional delay to execution.
     * The runnable will be run on the thread to which this handler is attached.
     *
     * @param r The Runnable that will be executed.
@@ -352,6 +353,7 @@ public class Handler {
     * Causes the Runnable r to be added to the message queue, to be run
     * at a specific time given by <var>uptimeMillis</var>.
     * <b>The time-base is {@link android.os.SystemClock#uptimeMillis}.</b>
     * Time spent in deep sleep will add an additional delay to execution.
     * The runnable will be run on the thread to which this handler is attached.
     *
     * @param r The Runnable that will be executed.
@@ -377,6 +379,8 @@ public class Handler {
     * after the specified amount of time elapses.
     * The runnable will be run on the thread to which this handler
     * is attached.
     * <b>The time-base is {@link android.os.SystemClock#uptimeMillis}.</b>
     * Time spent in deep sleep will add an additional delay to execution.
     *  
     * @param r The Runnable that will be executed.
     * @param delayMillis The delay (in milliseconds) until the Runnable
@@ -570,6 +574,7 @@ public class Handler {
     * Enqueue a message into the message queue after all pending messages
     * before the absolute time (in milliseconds) <var>uptimeMillis</var>.
     * <b>The time-base is {@link android.os.SystemClock#uptimeMillis}.</b>
     * Time spent in deep sleep will add an additional delay to execution.
     * You will receive it in {@link #handleMessage}, in the thread attached
     * to this handler.
     *