gtool5 Fortran 90/95 Library 1.0.0-rc5
日本語
Loading...
Searching...
No Matches
Public Member Functions | List of all members
dc_clock::operator(+) Interface Reference

Public Member Functions

type(clock) function dcclockadd (clk1, clk2)
 

Detailed Description

Definition at line 151 of file dc_clock.f90.

Member Function/Subroutine Documentation

◆ dcclockadd()

type(clock) function dc_clock::operator(+)::dcclockadd ( type(clock), intent(in)  clk1,
type(clock), intent(in)  clk2 
)

Add CLOCK variables

Adds CLOCK variables clk1 and clk2. Sums the CPU times of the two given CLOCK variables and returns as CLOCK. The name of the result is a combination of clk1 and clk2 names joined by '+'.

Parameters
[in]clk1First CLOCK variable
[in]clk2Second CLOCK variable
Returns
Sum of the two CLOCK variables

Definition at line 927 of file dc_clock.f90.

928 use dc_string, only: cprintf
929 use dc_date, only: operator(+), operator(<)
930 implicit none
931 type(CLOCK), intent(in):: clk1
932 type(CLOCK), intent(in):: clk2
933 type(CLOCK):: clk_total
934 continue
935 if (.not. clk1 % initialized .or. .not. clk2 % initialized) then
936 clk_total % initialized = .false.
937 return
938 end if
939 clk_total % name = cprintf('%c+%c', &
940 & c1=trim(clk1 % name), c2=trim(clk2 % name))
941 clk_total % start_time = - 1.0
942 clk_total % initialized = .true.
943 clk_total % elapsed_time = 0.0
944 if (clk1 % start_date < clk2 % start_date) then
945 clk_total % start_date = clk1 % start_date
946 else
947 clk_total % start_date = clk2 % start_date
948 end if
949 clk_total % elapsed_time = &
950 & clk1 % elapsed_time + clk2 % elapsed_time
Date and time manipulation module.
Definition dc_date.f90:57
Handling character types.
Definition dc_string.f90:83

The documentation for this interface was generated from the following file: