Stopwatch_Class Module

module~~stopwatch_class~~UsesGraph module~stopwatch_class Stopwatch_Class module~m_strings m_strings module~m_strings->module~stopwatch_class module~variablekind variableKind module~variablekind->module~stopwatch_class module~variablekind->module~m_strings module~m_time m_time module~variablekind->module~m_time module~m_parameters m_parameters module~variablekind->module~m_parameters module~m_errors m_errors module~variablekind->module~m_errors iso_fortran_env iso_fortran_env iso_fortran_env->module~stopwatch_class iso_fortran_env->module~m_strings iso_fortran_env->module~variablekind iso_fortran_env->module~m_errors module~m_time->module~stopwatch_class module~m_parameters->module~m_strings module~m_errors->module~m_strings
Help

Contains code timing capabilities

Example usage

program stopwatch_test
use variableKind, only: i32
use Stopwatch_Class, only: Stopwatch
type(Stopwatch) :: clk
integer(i32) :: i, N
call clk%start('Some Title')
N = 100000
do i = 1, N
  Compute some stuff
enddo
call clk%stop()
call clk%elapsed()
write(*,'(a)') 'Finished on '//clk%datetime()
end program

Used By

module~~stopwatch_class~~UsedByGraph module~stopwatch_class Stopwatch_Class program~scaletest_coretran scaleTest_coretran module~stopwatch_class->program~scaletest_coretran module~m_tests m_tests module~stopwatch_class->module~m_tests module~progressbar_class ProgressBar_Class module~stopwatch_class->module~progressbar_class program~test_coretran test_coretran module~m_tests->program~test_coretran module~progressbar_class->program~scaletest_coretran module~progressbar_class->module~m_tests
Help


Derived Types

type, public :: Stopwatch

Class for timing sections of code, See the Stopwatch_Class module documentation for usage.

Type-Bound Procedures

procedure, public :: start => start_Stopwatch

Start the Stopwatch

procedure, public :: stop => stop_Stopwatch

Stop the Stopwatch

procedure, public :: reset => reset_Stopwatch

Reset the Stopwatch

procedure, public :: restart => restart_Stopwatch

Restart the Stopwatch

procedure, public :: time => time_Stopwatch

Get the current or stopped time

procedure, public :: lap => lap_Stopwatch

Lap the Stopwatch

procedure, public :: lapInSeconds => lapInSeconds_Stopwatch

Get the lap time in seconds

procedure, public :: elapsed => elapsed_Stopwatch

Get the current elapsed time

procedure, public :: elapsedInSeconds => elapsedInSeconds_Stopwatch

Get the elapsed time in seconds

procedure, public :: date => date_Stopwatch

Print the date

procedure, public :: dateAndTime => dateAndTime_Stopwatch

Print the date and time