Returns elapsed CPU time in seconds since its first call. Uses standard f90 call
function io_time()
!===========================================================
!
!! Returns elapsed CPU time in seconds since its first call.
!! Uses standard f90 call
!
!===========================================================
use w90_constants, only: dp
implicit none
real(kind=dp) :: io_time
! t0 contains the time of the first call
! t1 contains the present time
real(kind=dp) :: t0, t1
logical :: first = .true.
save first, t0
!
call cpu_time(t1)
!
if (first) then
t0 = t1
io_time = 0.0_dp
first = .false.
else
io_time = t1 - t0
endif
return
end function io_time