ivutils
|
Timer that can be started, stopped and measure its working time usually timer corresponds to some process, for example solving number of equations timer can be part of some timers hierarchy which corresponds to hierarchy of processes, for example solving of some equations is part of modeling of some physical process (upper level process), but it has as a part solving of one particular equation (lower level process). More...
#include <component.h>
Public Member Functions | |
apTimer (int started=0, apTimer *parent_=NULL) | |
number of started timers of lower level plus this timer | |
apTimer * | bind (apTimer *p) |
attach timer p to the list of upper level timers parentv | |
int | start (double t0_=-1) |
if timer is not started, start this timer and all timers of upper level | |
int | stop (int force=0, double tset_=-1) |
if all lower level timers are stopped, stop timer and inform upper level timers about this if force, stop timer and upper level timers | |
double | update () |
updates time and t0. returns time | |
Static Public Member Functions | |
static double | gettime (bool local=true) |
If local==true, it will be time on current processor, otherwise time on zero processor of mpi. | |
Timer that can be started, stopped and measure its working time usually timer corresponds to some process, for example solving number of equations timer can be part of some timers hierarchy which corresponds to hierarchy of processes, for example solving of some equations is part of modeling of some physical process (upper level process), but it has as a part solving of one particular equation (lower level process).
hierarchy of timers should correspond this hierarchy of processes. starting lower level timer causes starting upper level timers, so upper level timers should summate time measured by their lower level timers.
|
static |
If local==true, it will be time on current processor, otherwise time on zero processor of mpi.
If USE_MPI is not defined it fallbacks to real time, mesured by high_resolution_clock.