setTimeout

abstract fun setTimeout(callback: (params: Array<out Any?>) -> Unit, delay: Long, vararg params: Any?): Int

添加延时任务.

Receiver

Return

延时任务id, 移除延时任务 clearTimeout 时需要使用

Parameters

callback

延时任务执行的函数

delay

延时时长(以毫秒为单位)

params

延时任务执行时需要传递的参数