diff options
Diffstat (limited to 'common/utilities.F90')
-rw-r--r-- | common/utilities.F90 | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/common/utilities.F90 b/common/utilities.F90 index d746e0f..e200def 100644 --- a/common/utilities.F90 +++ b/common/utilities.F90 @@ -603,4 +603,33 @@ contains end function build_date + subroutine sleep_ms(ms) + use iso_c_binding + implicit none + + integer, intent(in)::ms + +#ifdef WINDOWS + + interface + subroutine sleep_win(x) bind(c, name="Sleep") + integer(kind=8), value::x + end subroutine sleep_win + end interface + + call sleep_win(int(ms, kind=8)) + +#else + + + character(len=40)::cl + + write(cl, *) "sleep ", real(ms)/1000.0 + + call execute_command_line(cl) + +#endif + + end subroutine sleep_ms + end module utilities |