Skip to content

Commit

Permalink
[bugfix] fix typos in fsys_sleep.fypp
Browse files Browse the repository at this point in the history
  • Loading branch information
yymmt742 committed Jun 4, 2024
1 parent 9244ff8 commit 2068486
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/fsys_sleep.fypp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ submodule(fsys) fsys_sleep
subroutine Sleep(dwMillseconds) bind(c)
import C_LONG
integer(C_LONG), value, intent(in) :: dwMillseconds
end function Sleep
end subroutine Sleep
#:else
function usleep(usec) bind(c)
import C_INT
Expand All @@ -23,7 +23,9 @@ contains
module subroutine ${routine_name("sleep", post)}$(sec)
${type}$, intent(in) :: sec
#:if WIN32
call Sleep(NINT(sec * 1000.0_RK, C_LONG))
integer(C_LONG) :: dwMillseconds
dwMillseconds = NINT(sec * 1000.0_RK)
call Sleep(dwMillseconds)
#:else
integer(C_INT) :: ierr
ierr = usleep(NINT(sec * 1000000.0_RK, C_INT))
Expand Down

0 comments on commit 2068486

Please sign in to comment.