dc_clock::dcclockstop Interface Reference

Private Member Functions

subroutine dcclockstop0 (clk, err)
 

Detailed Description

Definition at line 143 of file dc_clock.f90.

Member Function/Subroutine Documentation

◆ dcclockstop0()

subroutine dc_clock::dcclockstop::dcclockstop0 ( type(clock), intent(inout)  clk,
logical, intent(out), optional  err 
)
private

Definition at line 300 of file dc_clock.f90.

300  !
301  !=== 計測の一時停止
302  !
303  ! このサブルーチンを呼んだ時点で計測を一時停止します.
304  !
305  ! 第一引数 *clk* に対して DCClockCreate による初期化が行われていない場合,
306  ! エラーを発生させます. *err* を与える場合には *err* に .true. が返り,
307  ! プログラムは続行されます.
308  !
309  use dc_message, only: messagenotify
310  use dc_string, only: tochar
312  use dc_date, only: evalsec, operator(+), operator(-)
313  use dc_date_types, only: dc_difftime
314  use dc_types, only: dp
315  implicit none
316  type(clock), intent(inout):: clk
317  logical, intent(out), optional:: err
318  character(STRING):: cause_c
319  real:: stop_time
320  integer:: stat
321  character(*), parameter:: subname = 'DCClockStop'
322  continue
323  call beginsub(subname)
324  stat = dc_noerr
325  cause_c = 'CLOCK'
326  if (.not. clk % initialized) then
327  call messagenotify('W', subname, 'Call Create before Stop in dc_clock.')
328  call dbgmessage('Ignored because input argument was not initialized.')
329  stat = dc_enotinit
330  goto 999
331  elseif (clk % start_time < 0.0_dp) then
332  call messagenotify('W', subname, 'Call Start before Stop in dc_clock.')
333  call dbgmessage('Ignored because input argument was not started.')
334  goto 999
335  end if
336  call cpu_time(stop_time)
337  clk % elapsed_time = clk % elapsed_time + stop_time - clk % start_time
338  clk % start_time = - 1.0
339  call dbgmessage('name=%c, cpu_time=%r, elapsed_time=%f', &
340  & c1=trim(clk % name), r=(/stop_time/), d=(/clk % elapsed_time/))
341 999 continue
342  call storeerror(stat, subname, err, cause_c)
343  call endsub(subname)
integer, parameter, public dc_enotinit
Definition: dc_error.f90:557
subroutine, public storeerror(number, where, err, cause_c, cause_i)
Definition: dc_error.f90:830
integer, parameter, public dc_noerr
Definition: dc_error.f90:509
integer, parameter, public dp
倍精度実数型変数
Definition: dc_types.f90:83
文字型変数の操作.
Definition: dc_string.f90:24
種別型パラメタを提供します。
Definition: dc_types.f90:49

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