Compute Elapsed Wallclock Time

**WTIME**
is a MATLAB library which
returns a reading of the wall clock time.

For parallel programming, the important thing to measure is the elapsed wallclock time. This can be found by subtracting an initial reading of the wallclock time from a final one.

The OpenMP system provides a function used as follows:

seconds = omp_get_wtime ( ) operations to time; seconds = omp_get_wtime ( ) - seconds;while the MPI system provides a similar function used as:

seconds = MPI_Wtime ( ); operations; seconds = MPI_Wtime ( ) - seconds;and in MATLAB, wallclock time can be taken with "tic" and "toc":

tic; operation; seconds = toc;

WTIME provides a way to get a similar reading:

seconds = wtime ( ); operations; seconds = wtime ( ) - seconds;

The computer code and data files described and made available on this web page are distributed under the GNU LGPL license.

**WTIME** is available in
a C version and
a C++ version and
a FORTRAN77 version and
a FORTRAN90 version and
a MATLAB version and
a PYTHON version.

TIC_TOC, MATLAB programs which demonstrate some features of MATLAB's tic and toc functions for wallclock timing.

TIMER, a MATLAB program which shows how to compute the elapsed CPU time inside a program.

TIMESTAMP, a MATLAB library which displays the current wall clock time.

- timestamp.m, prints the current YMDHMS date as a timestamp.
- wtime.m, the source code.

- wtime_test.m, a sample calling program.
- wtime_test01.m, times the MATLAB RAND function.
- wtime_test02.m, times the vectorized EXP function.
- wtime_test03.m, times the unvectorized EXP function.
- wtime_test04.m, times the 2D nearest neighbor problem.
- wtime_test05.m, times the matrix multiplication problem.
- wtime_test_output.txt, the output file.

You can go up one level to the MATLAB source codes.