sleep

fun sleep(ms: Int): Int

Sleeps the current thread.

Return

the actual amount of time slept in milliseconds, which is subject to system clock accuracy

Parameters

ms

the length of time to sleep in milliseconds, which is adjusted by a random variance

fun sleep()

Sleeps the current thread for a duration that is 10 times the value of Random.getDelay.