Author(s): See below | Library: KERNLIB |
Submitter: | Submitted: 15.01.1977 |
Language: Fortran or C or Assembler | Revised: 18.09.1991 |
Authors: J. Harms, E. Jansen, A. Michalon, J. Zoll,
A. Berglund, T. Cass, C. Wood, H. Renshall.
The DATIME package interfaces with the system of any particular
machine to obtain the current calendar date and time, as well as the
central processor time used by and remaining to the job.
Structure:
SUBROUTINE subprograms
User Entry Names: DATIME, DATIMH, TIMEX,
TIMEL, TIMED, TIMEST
External References: Machine dependent
COMMON Block Names: /SLATE/ ISL(40)
Usage:
CALL DATIME(ID,IT)returns decimal INTEGER date and time: ID=yymmdd, IH=hhmm. It also stores the components into /SLATE/ as small integers:
CALL DATIMH(ND,NT)returns Hollerith date and time: ND = 8Hdd/mm/yy and NT = 8Hhh.mm.ss
CALL TIMEX(T)returns the execution time used by the job so far; T is the central processor time in seconds, a REAL number with fractional part. In supported interactive systems the time returned is that relative to the first call to TIMEST.
CALL TIMEL(T)returns the execution time remaining until time-limit; T in seconds as for TIMEX. In supported interactive systems the time returned is the time left until the time-limit set by the first call to TIMEST. See Note 4 below.
CALL TIMED(T)returns the execution time interval since the last call to TIMED; T in seconds as for TIMEX.
CALL TIMEST(TLIM)This routine is necessary to initialise the timing operations in the interactive mode of VM-CMS. In other systems (including VM-CMS batch) it is a dummy do-nothing routine.
It must be called once (subsequent calls are ignored) before any calls to TIMEX and TIMEL. Before this routine is called TIMEX will return zero and TIMEL will return 999.0. TLIM is an input floating point value which will be used inside TIMEL as if it were the job time-limit. The first call to TIMEST also establishes the time origin for subsequent calls to TIMEX and TIMEL.
Accuracy:
IBM: The RMS error returned in consecutive calls to TIMED without any intermediate code is of the order of 3 sec on the the CERN IBM 3090 with a minimum time for one call of 20 sec. The timing distribution has a long tail, however, and any individual measurement could take as long as four or five times this value. TIMEX is accurate to within a tenth of a second and TIMEL only to the nearest second.
Notes:
Examples:
Suppose the date is Sept 16, 1976, and the time of day 19h 24m 55s.
CALL DATIME(ID,IT)returns
CALL DATIMH(ND,NT)returns ND = 8H16/09/76 and NT = 8H19.24.55.