END_PAUSE_WATCH
resumes a paused StopWatch
watch
SYNOPSIS
subroutine end_pause_watch (watch, clock, err)
DESCRIPTION
Resumes the running status of the specified clocks of the specified watches that
have previously been paused (see pause_watch(3)).
Pausing is useful when
you want to temporarily stop the clocks to avoid timing a small segment of code,
for example printed output or graphics, but do not know which watches or
clocks are running. When pause_watch
is called, the information about
which of the clocks were running is maintained, so that a subsequent call to
end_pause_watch
will restart only those clocks that were running.
One or more watches must be specified. The argument watch can be a single variable of type watchtype (see stopwatch(3)) to resume one watch, an array of type watchtype to resume several watches, or a variable of type watchgroup (see stopwatch(3)) to resume the watches in a group.
The optional argument clock specifies which clocks to resume on the specified watch(es). If omitted, the current default clocks (see option_stopwatch(3)) are resumed. If present, clock must be a character string containing 'cpu', 'user', 'sys', or 'wall', or an array of such character strings.
DIAGNOSTICS
If present, the optional intent OUT integer argument err
returns
a status code. The code is the sum of the values listed below.
An error message will be printed to a specified I/O unit (unit 6 by default) if print_errors is TRUE (default is TRUE). The error message contains more detail about the cause of the error than can be obtained from just the status code, so you should set print_errors to TRUE if you have trouble determining the cause of the error.
If abort_errors is TRUE (default is FALSE), the program will terminate on an error condition. Otherwise, the program will continue execution but the watch(es) will not be resumed.
See option_stopwatch(3) for further information on print_errors, abort_errors and I/O units.
The relevant status codes and messages are:
In addition to the run time diagnostics generated by StopWatch
, the following
problem may arise:
EXAMPLES
type (watchtype) w1, w2(3)
type (watchgroup) g1
integer errcode
call end_pause_watch(w1)
call end_pause_watch(w2, err=errcode)
call end_pause_watch(g1, (/'cpu ', 'wall'/), errcode)
The first call resumes the default clocks on a single watch. The second call resumes the default clocks on three watches given as an array and returns a status code. The third call resumes the cpu and wall clocks on the watches in the group g1, and returns a status code.
BUGS
It cannot be determined whether or not a watch variable or
watch group has been created (passed
as an argument to create_watch
or create_watchgroup).
If
a watch or watch group that has never been created
is passed into end_pause_watch,
it might
generate a Fortran error due to passing a pointer with undefined association
status to the Fortran intrinsic function associated.
Some compilers
will allow this as an extension to the Fortran 90 standard and recognize that
the pointer is not associated, in which case the ``Watch needs to be created''
error message is generated.