Sometimes while optimizing code it is required to time certain portions of the code, I have been using the following for years but was wondering if there is a simpler/better way to do it?
call system_clock(count_rate=clock_rate) !Find the time rate
call system_clock(count=clock_start) !Start Timer
call do_something_subroutine !This is what gets timed
call system_clock(count=clock_stop) ! Stop Timer
e_time = real(clock_stop-clock_start)/real(clock_rate)
-pg,-gis for debug symbols (also interesting, but not required) – RSFalcon7 Apr 11 '13 at 13:50