gtool5 Fortran 90/95 Library 1.0.0-rc5
日本語
Loading...
Searching...
No Matches
dc_clock::operator(-) Interface Reference

Public Member Functions

type(clock) function dcclocksubtract (clk1, clk2)

Detailed Description

Definition at line 158 of file dc_clock.f90.

Member Function/Subroutine Documentation

◆ dcclocksubtract()

type(clock) function dc_clock::operator(-)::dcclocksubtract ( type(clock), intent(in) clk1,
type(clock), intent(in) clk2 )

Subtract CLOCK variables

Subtracts clk2 from CLOCK variable clk1. Returns the difference between the CPU times of the two CLOCK variables. The name of the result is a combination of clk1 and clk2 names joined by '-'.

Parameters
[in]clk1First CLOCK variable (minuend)
[in]clk2Second CLOCK variable (subtrahend)
Returns
Difference of the two CLOCK variables

Definition at line 989 of file dc_clock.f90.

990 use dc_string, only: cprintf
991 use dc_date, only: operator(-), operator(<)
992 implicit none
993 type(CLOCK), intent(in):: clk1
994 type(CLOCK), intent(in):: clk2
995 type(CLOCK):: clk_total
996 continue
997 if (.not. clk1 % initialized .or. .not. clk2 % initialized) then
998 clk_total % initialized = .false.
999 return
1000 end if
1001 clk_total % name = cprintf('%c-%c', &
1002 & c1=trim(clk1 % name), c2=trim(clk2 % name))
1003 clk_total % start_time = - 1.0
1004 clk_total % initialized = .true.
1005 clk_total % elapsed_time = 0.0
1006 if (clk1 % start_date < clk2 % start_date) then
1007 clk_total % start_date = clk1 % start_date
1008 else
1009 clk_total % start_date = clk2 % start_date
1010 end if
1011 clk_total % elapsed_time = &
1012 & 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: