rtc
- Date:
02-06-2023
NAME
_rtc, RTC, IRTC, IRTC_RATE - Returns clock register contents
SYNOPSIS
C
#include <intrinsics.h>
long long _rtc (void);
Fortran
RTC ()
IRTC ()
INTEGER(KIND=8) irtc_rate
IRTC_RATE ()
STANDARDS
C extension
Fortran extension
DESCRIPTION
The _rtc, RTC, and IRTC intrinsic functions return a real-time clock value. The value is expressed as the number of clock ticks. The IRTC_RATE function returns the clock rate of the IRTC and RTC functions.
NOTES
Values for IRTC should not be compared between threads, because the value is thread specific.
C
The compiler generates inline code to produce the result.
Fortran
The names of these intrinsics cannot be passed as arguments.
The RTC function is outmoded and its use is not recommended. See the standard SYSTEM_CLOCK intrinsic subroutine for the preferred alternative. For information on outmoded features and their preferred standard alternatives, see the Cray Fortran Reference Manual.
RETURN VALUES
RTC returns the low-order 52 bits of the system clock expressed as a REAL(KIND=8) value.
IRTC returns the system clock as an INTEGER(KIND=8) value.
IRTC_RATE returns the number of IRTC and RTC clock ticks per second in an INTEGER(KIND=8) value.
EXAMPLE
REAL(KIND=8) RNUM
INTEGER(KIND=8) INUM, IRATE
INTEGER(KIND=8) IRTC_RATE
RNUM = RTC()
INUM = IRTC()
IRATE = IRTC_RATE()
SEE ALSO
For a complete list of C intrinsic functions, see the Cray C and C++ Reference Manual.
ftn(1), second(3f), sysclock(3f), system_clock(3i)