gtool5 Fortran 90/95 ライブラリ 1.0.0-rc5
English
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 )

CPU 時間 (単位: 秒) の取得 (倍精度)

CPU 時間 (単位: 秒) を sec に取得します。

clk に対して DCClockCreate による初期化が行われていない場合、 エラーを発生させます。err を与える場合には err に .true. が返り、 プログラムは続行されます。

Parameters
[in]clkCLOCK 型変数
[out]secCPU 時間 (秒、倍精度)
[out]errエラーフラグ (省略可)。エラー時に .true.。

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)
日付および時刻に関する手続きを提供するモジュール
Definition dc_date.f90:57
エラー処理用モジュール
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 以下: dc ユーティリティのエラー
Definition dc_error.f90:534
integer, parameter, public dc_noerr
エラー等を保持
Definition dc_error.f90:468
メッセージの出力
文字型変数の操作
Definition dc_string.f90:83
種別型パラメタを提供します。
Definition dc_types.f90:55
integer, parameter, public dp
倍精度実数型変数
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 )

CPU 時間 (単位: 秒) の取得 (単精度)

CPU 時間 (単位: 秒) を sec に取得します。

clk に対して DCClockCreate による初期化が行われていない場合、 エラーを発生させます。err を与える場合には err に .true. が返り、 プログラムは続行されます。

Parameters
[in]clkCLOCK 型変数
[out]secCPU 時間 (秒、単精度)
[out]errエラーフラグ (省略可)。エラー時に .true.。

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: