When timing a FORTRAN program i usually just use the command call cpu_time(t). Then i stumbled across call system_clock([count,count_rate,count_max])<
call cpu_time(t)
call system_clock([count,count_rate,count_max])<
I find secnds() to be the easiest way to get wall time. Its usage is almost identical to cpu_time().
real(8)::t1,delta t1=secnds(0.0) !Do stuff delta=seconds(t1)