cpu_time(3I)

CPU_TIME - Returns the processor time

As shipped in IRIX 6.5.5. Added in IRIX 6.5.5.

NAME
     CPU_TIME - Returns the processor time

SYNOPSIS
     CPU_TIME ([TIME=]time)

IMPLEMENTATION
     UNICOS, UNICOS/mk, and IRIX systems

     CF90, MIPSpro 7 Fortran 90

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.

     On UNICOS and UNICOS/mk systems, a call to CPU_TIME must be done once
     and before the first timing loop to initialize the time structure.
     CPU_TIME includes time accumulated by all processors in a multitasking
     program.

RETURN VALUES
     CPU_TIME returns -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

SEE ALSO
     Intrinsic Procedures Reference Manual for the printed version of this
     man page.