gtool5 Fortran 90/95 ライブラリ 1.0.0-rc5
English
Loading...
Searching...
No Matches
dc_clock::operator(-) Interface Reference

Public Member Functions

type(clock) function dcclocksubtract (clk1, clk2)

Detailed Description

Definition at line 154 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 )

CLOCK 変数を引き算する

CLOCK 変数 clk1 から clk2 を引きます。 1 つ目の CLOCK 変数の CPU 時間と 2 つ目の CLOCK 変数の CPU 時間との差を CLOCK 変数として返します。計測内容の名称は clk1clk2 の名称を '-' で組み合わせたものとなります。

Parameters
[in]clk11つ目の CLOCK 変数 (被減数)
[in]clk22つ目の CLOCK 変数 (減数)
Returns
2 つの CLOCK 変数の差

Definition at line 976 of file dc_clock.f90.

977 use dc_string, only: cprintf
978 use dc_date, only: operator(-), operator(<)
979 implicit none
980 type(CLOCK), intent(in):: clk1
981 type(CLOCK), intent(in):: clk2
982 type(CLOCK):: clk_total
983 continue
984 if (.not. clk1 % initialized .or. .not. clk2 % initialized) then
985 clk_total % initialized = .false.
986 return
987 end if
988 clk_total % name = cprintf('%c-%c', &
989 & c1=trim(clk1 % name), c2=trim(clk2 % name))
990 clk_total % start_time = - 1.0
991 clk_total % initialized = .true.
992 clk_total % elapsed_time = 0.0
993 if (clk1 % start_date < clk2 % start_date) then
994 clk_total % start_date = clk1 % start_date
995 else
996 clk_total % start_date = clk2 % start_date
997 end if
998 clk_total % elapsed_time = &
999 & clk1 % elapsed_time - clk2 % elapsed_time
日付および時刻に関する手続きを提供するモジュール
Definition dc_date.f90:57
文字型変数の操作
Definition dc_string.f90:83

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