clock_end Subroutine

private subroutine clock_end(me, case_str)

Print runtime in milliseconds form the start of the clock.

Type Bound

clock

Arguments

Type IntentOptional Attributes Name
class(clock), intent(inout) :: me
character(len=*), intent(in) :: case_str

description of the case


Source Code

    subroutine clock_end(me, case_str)
        class(clock),intent(inout) :: me
        character(len=*),intent(in) :: case_str !! description of the case
        integer :: itime !! time in integer milliseconds
        call system_clock(me%end)
        itime = int(1000*(me%end - me%begin) / real(me%rate, wp))
        write(*,'(a,I5,a)') trim(case_str)//' runtime: ', itime, ' ms'
        write(*,'(a)') '---------------------------'
        write(*,*) ''
    end subroutine clock_end