43 #include "sll_working_precision.h"
58 integer,
parameter ::
itimer = selected_int_kind(18)
62 integer(kind=itimer) :: clock_ticks
63 integer(kind=itimer) :: clock_ticks_max
64 integer(kind=itimer) :: clock_ticks_per_sec
73 call system_clock(count=timer_obj%clock_ticks, &
74 count_rate=timer_obj%clock_ticks_per_sec, &
75 count_max=timer_obj%clock_ticks_max)
86 integer(kind=itimer) :: clock_ticks
88 clock_ticks = t1%clock_ticks - t0%clock_ticks
93 real(clock_ticks, kind=f64)/real(t0%clock_ticks_per_sec, kind=f64)
103 integer(kind=itimer) :: t1
104 integer(kind=itimer) :: clock_ticks
106 call system_clock(count=t1)
107 clock_ticks = t1 - t0%clock_ticks
112 real(clock_ticks, kind=f64)/real(t0%clock_ticks_per_sec, kind=f64)
We can now use the functions.
subroutine, public sll_s_set_time_mark(timer_obj)
reads time parameters from system and stores in its argument. param timer_obj an object of type sll_t...
real(kind=f64) function, public sll_f_time_elapsed_since(t0)
Computes the time elapsed since a particular time mark was set.
integer, parameter itimer
Kind parameter defined here determines clock resolution (e.g. see 'system_clock' intrinsic subroutine...
real(kind=f64) function, public sll_f_time_elapsed_between(t0, t1)
Computes the time elapsed between two time marks.
type use for clock reading