public function profiler_get_time(name) result(t)
Accumulated time (s) for a named region. Public for the unit-test suite only.
Arguments
| Type |
Intent | Optional | Attributes |
|
Name |
|
|
character(len=*),
|
intent(in) |
|
|
:: |
name |
|
Return Value
real(kind=dp)
Variables
| Type |
Visibility | Attributes |
|
Name |
| Initial | |
|
integer,
|
private |
|
:: |
idx |
|
|
|
Source Code
function profiler_get_time(name) result(t)
!! Accumulated time (s) for a named region. Public for the unit-test suite only.
character(len=*), intent(in) :: name
real(dp) :: t
integer :: idx
t = 0.0_dp
do idx = 1, state%num_regions
if (trim(state%regions(idx)%name) == trim(name)) then
t = state%regions(idx)%total_time
return
end if
end do
end function profiler_get_time