JOINT   INSTITUTE   FOR   NUCLEAR   RESEARCH
lit
  Program   Library  JINRLIB rus

D_TIMED, D_DATIME, D_DATIMH, D_TIMEX - date and time

Z008

T.F.Sapojnikova Language: Fortran

D_TIMED,D_DATIME,D_DATIMH,D_TIMEX are Fortran-callable subroutnes to obtain the current calendar date and time, as well as user and system central processor (CPU) time.

Structure:

Type: - SUBROUTINE
User Entry Names: - D_TIMED, D_DATIME, D_DATIMH, D_TIMEX
COMMON-Block Names: - /Z008_DT/ IDT(6)

Usage:

CALL D_TIMED(T)

returns in T (REAL*8) the execution time interval since the last call to D_TIMED (in seconds).
At the first call D_TIMED returns T = 0.

CALL D_DATIME(ID,IT)

returns decimal (INTEGER) date and time:
ID=yyyymmdd, IT=hhmm.
It also stores the components into COMMON /Z008_DT/ IDT(6):
IDT(1)=yyyy, IDT(2)=mm, IDT(3)=dd,
IDT(4)=hh,   IDT(5)=mm, IDT(6)=ss.

CALL D_DATIMH(ND,NT)

returns Hollerith date and time:
ND = 10Hdd/mm/yyãã, NT = 8Hhh.mm.ss

CALL D_TIMEX(T)

returns the execution time used by the job.
T is the central processor time in seconds, a REAL*8 number whith fractional part.
Only for SPP, Linux.

Notes:

The symbol yyyy, mm, dd, hh, mm, ss used above stand for the four decimal digits of year and two decimal digits of month, day, hours, minutes, seconds.

For Microsoft Fortran 5.00, MicroSoft PowerStation Fortran and Compaq Visual Fortran for OS MS-DOS, Windows9X/NT/2000/XP astrnomical time equal executable.

Example:
       IMPLICIT REAL*8 (A-H,O-Z)
       CHARACTER*10 ND
       CHARACTER*8  NT
       . . .
       CALL D_TIMED(T)
       DO I=1,10000
         X=DSQRT(1.+I)
       ENDDO
       CALL D_TIMED(T)
       WRITE(*,'(4H T= ,F5.2)') T
       CALL D_DATIMH(ND,NT)
       WRITE(*,*)' Date: ',ND,'  Time: ',NT
       . . .
Result:
       T=   .05
       Date: 12/ 4/2002  Time: 16.49.58


home up e-mail