Idiom #45 Pause execution for 5 seconds
Sleep for 5 seconds in current thread, before proceeding with the next instructions.

Sleep for 5 seconds in current thread, before proceeding with the next instructions.
(<! (timeout 5000))
using namespace std::chrono_literals;
std::this_thread::sleep_for(5s);
module M_time
contains
subroutine system_sleep(wait)
use,intrinsic :: iso_c_binding, only: c_int
integer,intent(in) :: wait
integer(kind=c_int):: waited
interface
function c_usleep(msecs) bind (C,name="usleep")
import
integer(c_int) :: c_usleep
integer(c_int),intent(in),VALUE :: msecs
end function c_usleep
end interface
if(wait.gt.0)then
waited=c_usleep(int(wait,kind=c_int))
endif
end subroutine system_sleep
end module M_time
program x
use M_time
call system_sleep(5000000)
end
setTimeout(function(){
// Instructions after delay
},5000);
os.execute(package.config:sub(1,1) == "/" and "sleep 5" or "timeout 5")
local start = os.clock()
while os.clock() - start < 5 do end
Process.sleep(5000)
delay 5.0;
Sleep(5000);
usleep(5000000);
(<! (timeout 5000))
(Thread/sleep 5000)
using namespace std::chrono_literals; std::this_thread::sleep_for(5s);
Task.Delay(5000);
Thread.Sleep(5000);
Thread.sleep(5.seconds);
sleep(const Duration(seconds: 5));
await new Future.delayed(const Duration(seconds : 5));
timer:sleep(5000).
module M_time contains subroutine system_sleep(wait) use,intrinsic :: iso_c_binding, only: c_int integer,intent(in) :: wait integer(kind=c_int):: waited interface function c_usleep(msecs) bind (C,name="usleep") import integer(c_int) :: c_usleep integer(c_int),intent(in),VALUE :: msecs end function c_usleep end interface if(wait.gt.0)then waited=c_usleep(int(wait,kind=c_int)) endif end subroutine system_sleep end module M_time program x use M_time call system_sleep(5000000) end
time.Sleep(5 * time.Second)
Control.Concurrent.threadDelay 5000000
await new Promise(r => setTimeout(r, 5000));
setTimeout(function(){ // Instructions after delay },5000);
const sleep = ms => new Promise(resolve => setTimeout(resolve, ms)); await sleep(5000);
Thread.sleep(5000);
TimeUnit.SECONDS.sleep(5);
Thread.sleep(5000L)
(sleep 5)
os.execute(package.config:sub(1,1) == "/" and "sleep 5" or "timeout 5")
local start = os.clock() while os.clock() - start < 5 do end
[NSThread sleepForTimeInterval:5.0];
sleep(5);
sleep(5000);
sleep 5;
time.sleep(5)
sleep 5
thread::sleep(time::Duration::from_secs(5));
Thread.sleep(5000)
(sleep 5)
5 seconds wait.
System.Threading.Thread.Sleep(5000)