Sleep for specified seconds
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | seconds |
subroutine sys_sleep(seconds) integer, intent(in) :: seconds character(len=128) :: command if (get_os_type() == OS_WINDOWS) then write (command, '(A,I0,A)') 'ping -n ', seconds + 1, ' 127.0.0.1 >nul' else write (command, '(A,I0)') 'sleep ', seconds end if call execute_command_line(command) end subroutine sys_sleep