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

Public Member Functions

subroutine dcclockgetr (clk, sec, err)
subroutine dcclockgetd (clk, sec, err)

Detailed Description

Definition at line 142 of file dc_clock.f90.

Member Function/Subroutine Documentation

◆ dcclockgetd()

subroutine dc_clock::dcclockget::dcclockgetd ( type(clock), intent(in) clk,
real(dp), intent(out) sec,
logical, intent(out), optional err )

Get CPU time (in seconds) - double precision

Gets CPU time (in seconds) to sec.

If clk has not been initialized by DCClockCreate, an error is raised. If err is provided, .true. is returned in err and the program continues.

Parameters
[in]clkCLOCK type variable
[out]secCPU time in seconds (double precision)
[out]errError flag (optional). .true. if error occurred.

Definition at line 475 of file dc_clock.f90.

476 use dc_types, only: dp
477 use dc_string, only: cprintf
478 use dc_message, only: messagenotify
479 use dc_date, only: evalsec
481 implicit none
482 type(CLOCK), intent(in):: clk
483 real(DP), intent(out):: sec
484 logical, intent(out), optional:: err
485 character(STRING):: cause_c
486 integer:: stat
487 character(*), parameter:: subname = 'DCClockGetD'
488 continue
489 call beginsub(subname)
490 stat = dc_noerr
491 cause_c = 'CLOCK'
492 if (.not. clk % initialized) then
493 call messagenotify('W', subname, 'Call Create before Get in dc_clock.')
494 call dbgmessage('Ignored because input argument was not initialized.')
495 stat = dc_enotinit
496 goto 999
497 end if
498 sec = clk % elapsed_time
499 call dbgmessage('name=%c, return sec=<%f>', &
500 & c1=trim(clk % name), d=(/sec/))
501999 continue
502 call storeerror(stat, subname, err, cause_c)
503 call endsub(subname)
Date and time manipulation module.
Definition dc_date.f90:57
Error handling module.
Definition dc_error.f90:454
subroutine, public storeerror(number, where, err, cause_c, cause_i)
Definition dc_error.f90:891
integer, parameter, public dc_enotinit
-400 or less: DC utilities errors
Definition dc_error.f90:534
integer, parameter, public dc_noerr
Error storage variables
Definition dc_error.f90:468
Message output module.
Handling character types.
Definition dc_string.f90:83
Provides kind type parameter values.
Definition dc_types.f90:55
integer, parameter, public dp
Double Precision Real number
Definition dc_types.f90:92

References dc_trace::beginsub(), dc_trace::dbgmessage(), dc_error::dc_enotinit, dc_error::dc_noerr, dc_types::dp, dc_trace::endsub(), and dc_error::storeerror().

Here is the call graph for this function:

◆ dcclockgetr()

subroutine dc_clock::dcclockget::dcclockgetr ( type(clock), intent(in) clk,
real, intent(out) sec,
logical, intent(out), optional err )

Get CPU time (in seconds) - single precision

Gets CPU time (in seconds) to sec.

If clk has not been initialized by DCClockCreate, an error is raised. If err is provided, .true. is returned in err and the program continues.

Parameters
[in]clkCLOCK type variable
[out]secCPU time in seconds (single precision)
[out]errError flag (optional). .true. if error occurred.

Definition at line 420 of file dc_clock.f90.

421 use dc_message, only: messagenotify
422 use dc_date, only: evalsec
423 use dc_string, only: cprintft
425 implicit none
426 type(CLOCK), intent(in):: clk
427 real, intent(out):: sec
428 logical, intent(out), optional:: err
429 character(STRING):: cause_c
430 integer:: stat
431 character(*), parameter:: subname = 'DCClockGetR'
432 continue
433 call beginsub(subname)
434 stat = dc_noerr
435 cause_c = 'CLOCK'
436 if (.not. clk % initialized) then
437 call messagenotify('W', subname, 'Call Create before Get in dc_clock.')
438 call dbgmessage('Ignored because input argument was not initialized.')
439 stat = dc_enotinit
440 goto 999
441 end if
442 sec = real(clk % elapsed_time, kind=kind(sec))
443 call dbgmessage('name=%c, return sec=<%r>', &
444 & c1=trim(clk % name), r=(/sec/))
445999 continue
446 call storeerror(stat, subname, err, cause_c)
447 call endsub(subname)

References dc_trace::beginsub(), dc_trace::dbgmessage(), dc_error::dc_enotinit, dc_error::dc_noerr, dc_trace::endsub(), and dc_error::storeerror().

Here is the call graph for this function:

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