cpu_time(3I)

CPU_TIME - Returns the processor time

As shipped in IRIX 6.5.22. Last changed in IRIX 6.5.19.

NAME
     CPU_TIME - Returns the processor time

SYNOPSIS
     CPU_TIME ([TIME=]time)

STANDARDS
     Fortran

DESCRIPTION
     The CPU_TIME intrinsic subroutine returns the user time if successful.
     This intrinsic subroutine accepts the following argument:

     time      Must be a scalar and of type real.  It is an output
               argument.  The type of the argument is not restricted to any
               particular kind type.

     The name of this intrinsic cannot be passed as an argument.  The time
     returned by this intrinsic subroutine is user time on all systems.

RETURN VALUES
     CPU_TIME yields -1.0 if the time cannot be returned.

EXAMPLES
     The following program uses the CPU_TIME intrinsic subroutine and was
     run on an IRIX system:

          PROGRAM CPUTIMETEST
          REAL RTIME(2)
          CHARACTER(LEN=400)          :: EXPRIGHT2
          CHARACTER(LEN=800)          :: EXPRIGHT
          INTEGER  :: J
          CALL CPU_TIME(RTIME(1))
          IF (RTIME(1) .EQ. -1.0) THEN
             PRINT *,'CPU_TIME NOT WORKING, QUIT'
             PRINT *,'RTIME(1) =',RTIME(1)
             STOP 'UNSUCCESSFUL'
          ENDIF
          CALL CPU_TIME(RTIME(1))
          DO J = 1, 400
             EXPRIGHT2(J:J) = " "
          ENDDO
          CALL CPU_TIME(RTIME(2))
          PRINT *,'ELAPSED CPUTIME TIME=',RTIME(2) - RTIME(1)

          CALL CPU_TIME(RTIME(1))
          DO J = 1, 800
             EXPRIGHT(J:J) = " "
          ENDDO
          CALL CPU_TIME(RTIME(2))
          PRINT *,'ELAPSED CPUTIME TIME=',RTIME(2) - RTIME(1)
          end

     This program generated the following output:

          ELAPSED CPUTIME TIME= 1.109996811E-4
          ELAPSED CPUTIME TIME= 2.029994503E-4