!Description:
!  実行時間の計測 (date_and_time サブルーチンの結果を引数にとる)
!
! Current Code Owner: sugiyama@gfd-dennou.org
!
! History: 
!   Version    Date          Comment
!   -------    ----------    -------
!   1.0        2003-06-22    新規作成
!
! Copyright (C) SUGIYAMA Ko-ichiro, 2003, All rights reserved

!!!
!!!インターフェイス文
!!!
module interface_exec_time

  interface
     subroutine exec_time(time1, time2, time)
       integer, intent(in)     :: time1(:)
       integer, intent(in)     :: time2(:)
       integer, intent(out)    :: time(2)
     end subroutine exec_time
  end interface

end module interface_exec_time


!!!
!!!サブルーチン
!!!
subroutine exec_time(time1, time2, time)
  implicit none
  integer, intent(in)     :: time1(:)
  integer, intent(in)     :: time2(:)
  integer, intent(out)    :: time(2)

  integer                 :: sec 
  

  !時刻情報の取り出し
  sec = time2(5) * 60 * 60 + time2(6) * 60 + time2(7) &
       - (time1(5) * 60 * 60 + time1(6) * 60 + time1(7))

  time(1) = sec / 60     !分
  time(2) = mod(sec, 60)  !秒  

end subroutine exec_time
