Intel® Fortran Compiler 17.0 Developer Guide and Reference
Portability Function or Subroutine: The function returns the system time, in seconds, since 00:00:00 Greenwich mean time, January 1, 1970. TIME can be used as a portability function or subroutine, or as an intrinsic procedure. It is an intrinsic procedure unless you specify USE IFPORT.
USE IFPORT
Function Syntax:
result = TIME( )
Subroutine Syntax:
CALL TIME (timestr)
timestr |
(Output) Character*(*). Is the current time, based on a 24-hour clock, in the form hh:mm:ss, where hh, mm, and ss are two-digit representations of the current hour, minutes past the hour, and seconds past the minute, respectively. |
The result type is INTEGER(4). The result value is the number of seconds that have elapsed since 00:00:00 Greenwich mean time, January 1, 1970.
The subroutine fills a parameter with the current time as a string in the format hh:mm:ss.
The value returned by this routine can be used as input to other portability date and time functions.
USE IFPORT
INTEGER(4) int_time
character*8 char_time
int_time = TIME( )
call TIME(char_time)
print *, 'Integer: ', int_time, 'time: ', char_time
END