, larsmans, gprof - - , , ; , . , , - , , , , .
, omp_get_wtime(), ; , OpenMP - , , , , . Edited; .
Fortran90 system_clock(), ; , gfortran , ifort - . :
subroutine tick(t)
integer, intent(OUT) :: t
call system_clock(t)
end subroutine tick
! returns time in seconds from now to time described by t
real function tock(t)
integer, intent(in) :: t
integer :: now, clock_rate
call system_clock(now,clock_rate)
tock = real(now - t)/real(clock_rate)
end function tock
:
call tick(calc)
! do big calculation
calctime = tock(calc)
print *,'Timing summary'
print *,'Calc: ', calctime