summaryrefslogtreecommitdiff
path: root/map65/libm65/sleep_msec.f90
blob: 1e21ab27f323f7a959c6887ec1283e0575622c41 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
module sleep_msec_mod
  implicit none

  interface
     subroutine usleep(usec)
       ! Fortran-only interface to the C function usleep_
       integer(kind=8), intent(in) :: usec
     end subroutine usleep
  end interface

contains

  subroutine sleep_msec(n)
    integer, intent(in) :: n
    integer(kind=8) :: usec

    usec = int(n, kind=8) * 1000_8
    call usleep(usec)
  end subroutine sleep_msec

end module sleep_msec_mod