io_wallclocktime Function

public function io_wallclocktime()

Uses

  • proc~~io_wallclocktime~~UsesGraph proc~io_wallclocktime io_wallclocktime module~w90_constants w90_constants proc~io_wallclocktime->module~w90_constants

Arguments

None

Return Value real(kind=dp)


Called by

proc~~io_wallclocktime~~CalledByGraph proc~io_wallclocktime io_wallclocktime proc~wann_main wann_main proc~wann_main->proc~io_wallclocktime proc~berry_print_progress berry_print_progress proc~berry_print_progress->proc~io_wallclocktime proc~dis_extract dis_extract proc~dis_extract->proc~io_wallclocktime program~wannier wannier program~wannier->proc~wann_main proc~dis_main dis_main program~wannier->proc~dis_main proc~dis_main->proc~dis_extract proc~wannier_run wannier_run proc~wannier_run->proc~wann_main proc~wannier_run->proc~dis_main

Contents

Source Code


Source Code

  function io_wallclocktime()
    !==================================================================!
    !                                                                  !
    ! Returns elapsed wall clock time in seconds since its first call  !
    !                                                                  !
    !===================================================================
    use w90_constants, only: dp, i64
    implicit none

    real(kind=dp) :: io_wallclocktime

    integer(kind=i64) :: c0, c1
    integer(kind=i64) :: rate
    logical :: first = .true.
    save first, rate, c0

    if (first) then

      call system_clock(c0, rate)
      io_wallclocktime = 0.0_dp
      first = .false.
    else
      call system_clock(c1)
      io_wallclocktime = real(c1 - c0)/real(rate)
    endif
    return
  end function io_wallclocktime