clock Derived Type

type, public :: clock


Components

Type Visibility Attributes Name Initial
integer(kind=ip), private :: begin
integer(kind=ip), private :: end
integer(kind=ip), private :: rate

Type-Bound Procedures

procedure, public :: tic => clock_start

  • private subroutine clock_start(me)

    Start the clock

    Arguments

    Type IntentOptional Attributes Name
    class(clock), intent(inout) :: me

procedure, public :: toc => clock_end

  • private subroutine clock_end(me, case_str)

    Print runtime in milliseconds form the start of the clock.

    Arguments

    Type IntentOptional Attributes Name
    class(clock), intent(inout) :: me
    character(len=*), intent(in) :: case_str

    description of the case

Source Code

    type,public :: clock
        private
        integer(ip) :: begin, end, rate
    contains
        procedure,public :: tic => clock_start
        procedure,public :: toc => clock_end
    end type clock