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
Class for timing sections of code, See the Stopwatch_Class module documentation for usage.
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 |