开发者

android Difference between handler.postAtTime and handler.postDelayed

Please tell me the difference between handler.postAtTime and handler.postDelayed in android.And also please guide me when to use handler.postAtTime and when to use 开发者_JS百科handler.postDelayed.


From documentation:

For postAtTime:

public final boolean postAtTime (Runnable r, long uptimeMillis)
...
uptimeMillis The absolute time at which the callback should run, using the uptimeMillis() time-base. ...

And for postDelayed:

public final boolean postDelayed (Runnable r, long delayMillis)
...
delayMillis The delay (in milliseconds) until the Runnable will be executed. ...


If this is still not clear, postDelayed() run something after X millisecond from current time. While postAtTime() runs something at specified time XX:YY:ZZ.mmm.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜