Next: Examples
Up: Using StopWatch
Previous: Operations on Watch
Subroutines are provided to set several options within StopWatch , to
determine the current value of these options, and to determine system
dependent values of the implementation.
- option_stopwatch -- sets options within StopWatch .
- inquiry_stopwatch -- returns values of options and system dependent values
All arguments to these subroutines are optional. All arguments to
option_stopwatch are intent IN, and all
arguments to inquiry_stopwatch are intent OUT. The options that can be
set by option_stopwatch and read by inquiry_stopwatch are:
- default_clock -- character(len=*) or character(len=*)(:) (must be an array in
inquiry_stopwatch ). Specifies one or more
clock types to be used as the default clocks when the
clock argument is omitted. Initial default
(/'cpu ','user','sys ','wall'/). Unavailable clocks will
be automatically dropped from the list.
- io_unit_print -- integer. Specifies an I/O unit for printed output from
routine print_watch. Initial default is 6. The specified
unit must be open for writing sequential formatted output.
- io_unit_error -- integer. Specifies an I/O unit for printed error messages.
Initial default is 6. The specified unit must be open for
writing sequential formatted output.
- print_errors -- logical. Flag to specify whether or not error messages
should be printed. Initial default is .true.
- abort_errors -- logical. Flag to specify whether or not the program should
abort on an error. If the program does not abort, then the
requested operation is ignored and execution continues.
Initial default is .false.
- print_form -- character(len=*). Specifies the form for printing time
in print_watch. Currently all the forms print the time to .01
seconds. The valid values are:
- 'sec'. Print seconds as a real number.
This is the default.
- 'hh:mm:ss'. Print time as hours, minutes and seconds separated by colons.
- '[[hh:]mm:]ss'. The same as 'hh:mm:ss' except hours and minutes are
printed only if they are nonzero.
In addition, inquiry_stopwatch takes the following optional arguments:
- cpu_avail -- logical. True if the cpu clock is available in the
implementation.
- user_avail -- logical. True if the user clock is available in the
implementation.
- sys_avail -- logical. True if the sys clock is available in the
implementation.
- wall_avail -- logical. True if the wall clock is available in the
implementation.
- cpu_prec -- real. The cpu clock precision in seconds, i.e., the smallest
amount of time that the cpu, user and sys clocks can measure.
- wall_prec -- real. The wall clock precision in seconds.
- version -- character(len=16). The version number of StopWatch .
Next: Examples
Up: Using StopWatch
Previous: Operations on Watch