dm_timer Module

Basic timer to measure the seconds between start and stop by counting clock cycles.


Uses

  • module~~dm_timer~~UsesGraph module~dm_timer dm_timer module~dm_kind dm_kind module~dm_timer->module~dm_kind iso_fortran_env iso_fortran_env module~dm_kind->iso_fortran_env

Used by

  • module~~dm_timer~~UsedByGraph module~dm_timer dm_timer module~dmpack dmpack module~dmpack->module~dm_timer proc~dm_test_run dm_test_run proc~dm_test_run->module~dm_timer

Derived Types

type, public ::  timer_type

Timer type that holds CPU clock counts and rate.

Components

Type Visibility Attributes Name Initial
integer(kind=i8), public :: t(2) = 0_i8

CPU clock counts t1, t2.

integer(kind=i8), public :: rate = 0_i8

CPU clock rate.


Functions

public function dm_timer_result(timer) result(duration)

Returns elapsed time between timer start and stop in seconds as 8-byte real. The result is 0.0 if the timer has not been stopped yet.

Arguments

Type IntentOptional Attributes Name
type(timer_type), intent(inout) :: timer

Timer type.

Return Value real(kind=r8)


Subroutines

public subroutine dm_timer_stop(timer, duration)

Stops the timer and optionally returns result as 8-byte real in duration.

Arguments

Type IntentOptional Attributes Name
type(timer_type), intent(inout) :: timer

Timer type.

real(kind=r8), intent(out), optional :: duration

Elapsed time between start and stop [sec].

public subroutine dm_timer_start(timer)

Starts the timer by setting clock rate and first clock count.

Arguments

Type IntentOptional Attributes Name
type(timer_type), intent(inout) :: timer

Timer type.