Intel® Fortran Compiler Classic and Intel® Fortran Compiler Developer Guide and Reference

ID 767251
Date 3/31/2023
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

RTC

Portability Function: Returns the number of seconds elapsed since a specific Greenwich mean time.

Module

USE IFPORT

result = RTC( )

Results

The result type is REAL(8). The result is the number of seconds elapsed since 00:00:00 Greenwich mean time, January 1, 1970.

Example

 USE IFPORT
 real(8) s, s1, time_spent
 INTEGER(4) i, j
 s = RTC( )
 call sleep(4)
 s1 = RTC( )
 time_spent = s1 - s
 PRINT *, 'It took ',time_spent, 'seconds to run.'