DISPATCH
timer_mod Module Reference

Each thread uses a private timer data type, with arrays for start time and total time for each registered procedure. At begin, it stores the start time, and at end it increments the call counter and sums the time used into the total counter. More...

Functions/Subroutines

subroutine, public tic (time)
 

Variables

type(timer_t), public timer
 

Detailed Description

Each thread uses a private timer data type, with arrays for start time and total time for each registered procedure. At begin, it stores the start time, and at end it increments the call counter and sums the time used into the total counter.

We suspend counting of the active procedure if a new begin occurs, and resume it again on the next end call. Each subsequent begin call suspends the ongoing call, so we need a list of active counters.