函数原型:public boolean sendMessageAtTime (Message msg, long uptimeMillis)Since: API Level 1 Enqueue a message into the message queue after all pending messages before the absolute time (in milliseconds) uptimeMillis. The time-base is uptimeMillis(). You will receive it in handleMessage(Message), in the thread attached to this handler. ParametersuptimeMillis The absolute time at which the message should be delivered, using the uptimeMillis() time-base.参数 Message //不用说 是待发送消息 uptimeMillis //sendMessageAtTime,即在确定的时间发送这个消息,这个时间通过这个参数指定 这个时间由uptimeMillis()传递
Enqueue a message into the message queue after all pending messages before the absolute time (in milliseconds) uptimeMillis. The time-base is uptimeMillis(). You will receive it in handleMessage(Message), in the thread attached to this handler.
ParametersuptimeMillis The absolute time at which the message should be delivered, using the uptimeMillis() time-base.参数
Message //不用说 是待发送消息
uptimeMillis //sendMessageAtTime,即在确定的时间发送这个消息,这个时间通过这个参数指定
这个时间由uptimeMillis()传递
msgHandle.sendMessageAtTime(msg, SystemClock.uptimeMillis()+1000);
msgHandle.sendMessageDelayed(msg, 1000)sendMessageAtTime的uptimeMillis是相对系统开机时间的绝对时间,SystemClock.uptimeMillis()是当前开机时间。看手册就明白了