cpu_time
cpu_time
is a built-in subroutine i Fortran95. This is how you use it:
real :: t1, t2
call cpu_time(t1)
! code to be timed
call cpu_time(t2)
! the elapsed time is t2 - t1