HP MLIB User's Guide Vol. 2 7th Ed.

622 HP MLIB User’s Guide
WALLTIME Measure wall-clock time
Name WALLTIME
Measure wall-clock time
Purpose WALLTIME returns the current wall-clock time. A base time is set during the
first execution of WALLTIME, and the return value is the elapsed time from
this base. The time unit is seconds, and the resolution of the timer is
microseconds. WALLTIME also makes it easy to time a segment of code in a
program.
Usage VECLIB, VECLIB8, LAPACK, and ScaLAPACK:
Input tzero Starting time of a time interval you wish to measure.
See Notes for details.
Output time Elapsed wall-clock time in seconds minus tzero.
Notes To measure the wall-clock time used by a segment of code in a program, use
WALLTIME before and after the segment as follows:
REAL*4 WALLTIME, time, tzero
time = WALLTIME(tzero)
REAL*4 WALLTIME, time, tzero
tzero = WALLTIME(0.0)
segment of code to be timed
time = WALLTIME(tzero)