postDelayed

open override fun postDelayed(delay: Long, unit: TimeUnit, runnable: Runnable)

Posts passed runnable to the main thread to be run after the specified amount of time elapses.

Parameters

delay

The delay until the Runnable will be executed.

unit

The unit of the delay. Default is milliseconds.

runnable

The runnable to run on the main thread.