gtool5 Fortran 90/95 Library 1.0.0-rc5
日本語
Loading...
Searching...
No Matches
Public Member Functions | List of all members
dc_clock::dcclockget Interface Reference

Public Member Functions

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

Detailed Description

Definition at line 138 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 471 of file dc_clock.f90.

472 use dc_types, only: dp
473 use dc_string, only: cprintf
474 use dc_message, only: messagenotify
475 use dc_date, only: evalsec
477 implicit none
478 type(CLOCK), intent(in):: clk
479 real(DP), intent(out):: sec
480 logical, intent(out), optional:: err
481 character(STRING):: cause_c
482 integer:: stat
483 character(*), parameter:: subname = 'DCClockGetD'
484 continue
485 call beginsub(subname)
486 stat = dc_noerr
487 cause_c = 'CLOCK'
488 if (.not. clk % initialized) then
489 call messagenotify('W', subname, 'Call Create before Get in dc_clock.')
490 call dbgmessage('Ignored because input argument was not initialized.')
491 stat = dc_enotinit
492 goto 999
493 end if
494 sec = clk % elapsed_time
495 call dbgmessage('name=%c, return sec=<%f>', &
496 & c1=trim(clk % name), d=(/sec/))
497999 continue
498 call storeerror(stat, subname, err, cause_c)
499 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_noerr
Error storage variables
Definition dc_error.f90:468
integer, parameter, public dc_enotinit
-400 or less: DC utilities errors
Definition dc_error.f90:534
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 416 of file dc_clock.f90.

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