How to delay a block of code in Kotlin?

By using Hanlder we can execute a block of code with delay 

// Import
import android.os.Handler;

// Use
val handler = Handler()
handler.postDelayed({
     // Write your logic here which you want to execute with dely of  5000ms
}, 5000)