Pauses measurement at the point this subroutine is called.
359 use dc_date,
only: evalsec,
operator(+),
operator(-)
362
363 implicit none
364 type(CLOCK), intent(inout):: clk
365 logical, intent(out), optional:: err
366 character(STRING):: cause_c
367 real(DP):: stop_time
368 integer:: stat
369 character(*), parameter:: subname = 'DCClockStop'
370 continue
371 call beginsub(subname)
373 cause_c = 'CLOCK'
374 if (.not. clk % initialized) then
375 call messagenotify(
'W', subname,
'Call Create before Stop in dc_clock.')
376 call dbgmessage('Ignored because input argument was not initialized.')
378 goto 999
379 elseif (clk % start_time < 0.0_dp) then
380 call messagenotify(
'W', subname,
'Call Start before Stop in dc_clock.')
381 call dbgmessage('Ignored because input argument was not started.')
382 goto 999
383 end if
384 call cpu_time(stop_time)
385
386 clk % elapsed_time = clk % elapsed_time + stop_time - clk % start_time
387 clk % start_time = - 1.0
388 call dbgmessage('name=%c, cpu_time=%f, elapsed_time=%f', &
389 & c1=trim(clk % name), d=(/stop_time, clk % elapsed_time/))
390999 continue
392 call endsub(subname)
Derived types and parameters for date and time.
Date and time manipulation module.
subroutine, public storeerror(number, where, err, cause_c, cause_i)
integer, parameter, public dc_enotinit
-400 or less: DC utilities errors
integer, parameter, public dc_noerr
Error storage variables
Handling character types.
Provides kind type parameter values.
integer, parameter, public dp
Double Precision Real number