function wtime ( ) !*****************************************************************************80 ! !! WTIME returns a reading of the wall clock time. ! ! Discussion: ! ! To get the elapsed wall clock time, call WTIME before and after a given ! operation, and subtract the first reading from the second. ! ! This function is meant to suggest the similar routines: ! ! "omp_get_wtime ( )" in OpenMP, ! "MPI_Wtime ( )" in MPI, ! and "tic" and "toc" in MATLAB. ! ! Licensing: ! ! This code is distributed under the GNU LGPL license. ! ! Modified: ! ! 27 April 2009 ! ! Author: ! ! John Burkardt ! ! Parameters: ! ! Output, real ( kind = 8 ) WTIME, the wall clock reading, in seconds. ! implicit none integer ( kind = 4 ) clock_max integer ( kind = 4 ) clock_rate integer ( kind = 4 ) clock_reading real ( kind = 8 ) wtime call system_clock ( clock_reading, clock_rate, clock_max ) wtime = real ( clock_reading, kind = 8 ) & / real ( clock_rate, kind = 8 ) return end