CPU_TIME

Intrinsic Subroutine (Generic): Returns a processor-dependent approximation of the processor time in seconds. This is a new intrinsic procedure in Fortran 95. Intrinsic subroutines cannot be passed as actual arguments.

構文

CALL CPU_TIME (time)

time

(Output) Must be scalar and of type real.

The time returned is summed over all active threads. The result is the sum (in units of seconds) of the current process's user time and the user and system time of all its child processes, if any.

If a meaningful time cannot be returned, a processor-dependent negative value is returned.

Note icon

If you want to estimate performance or scaling of multithreaded applications, you should use intrinsic subroutine SYSTEM_CLOCK or portability function DCLOCK. Both of these routines return the elapsed time from a single clock.

Consider the following:

  REAL time_begin, time_end
  ...
  CALL CPU_TIME ( time_begin )
  !
  !task to be timed
  !
  CALL CPU_TIME ( time_end )
  WRITE (*,*) 'Time of operation was ', time_end - time_begin, ' seconds'

関連情報


このヘルプトピックについてのフィードバックを送信

© 1996-2011 Intel Corporation. 無断での引用、転載を禁じます。