Intel® Fortran Compiler Classic and Intel® Fortran Compiler Developer Guide and Reference
A newer version of this document is available. Customers should click here to go to the newest version.
Visible to Intel only — GUID: GUID-632CC6D5-E00A-40D1-8DD9-428E3F1EB87D
Visible to Intel only — GUID: GUID-632CC6D5-E00A-40D1-8DD9-428E3F1EB87D
DCLOCK
Portability Function: Returns the elapsed time in seconds since the start of the current process.
USE IFPORT
result = DCLOCK( )
The result type is REAL(8). This routine provides accurate timing to the nearest millisecond (Windows*) or to the nearest microsecond (Linux* and macOS), taking into account the frequency of the processor where the current process is running.
Note that the first call to DCLOCK performs calibration.
USE IFPORT
DOUBLE PRECISION START_TIME, STOP_TIME
START_TIME = DCLOCK()
CALL FOO()
STOP_TIME = DCLOCK()
PRINT *, 'foo took:', STOP_TIME - START_TIME, 'seconds.'