Blocking call that forces the current executing thread to sleep for n milliseconds
n - number of milliseconds to sleep for.
$start = ticks(); sleep(2 * 1000); # sleep for 2 seconds $elapsed = (ticks() - $start) / 1000.0; println("Elapsed time is: $elapsed seconds");
Elapsed time is: 2.001 seconds