MPQC  2.3.1
Public Member Functions | List of all members
sc::Timer Class Reference

The Timer class uses RegionTimer to time intervals in an exception safe manner. More...

#include <regtime.h>

Public Member Functions

 Timer (const char *name)
 Start timing a region using the default RegionTimer and activate the timer. More...
 
 Timer (const Ref< RegionTimer > &, const char *name)
 Start timing a region using the given RegionTimer. More...
 
 ~Timer ()
 Stop timing a region, if active.
 
void reset (const char *=0)
 Stop timing the current region, if active. More...
 

Detailed Description

The Timer class uses RegionTimer to time intervals in an exception safe manner.

It will automatically call RegionTimer::enter when its constructor is called and RegionTimer::exit when its destructor is called. The reset member can also result in RegionTimer's enter and exit routines being called. The programmer is responsible for making sure that timers are exited in the reverse of the order that they are entered.

Constructor & Destructor Documentation

◆ Timer() [1/2]

sc::Timer::Timer ( const char *  name)

Start timing a region using the default RegionTimer and activate the timer.

If a null name pointer is given, then the timer will not be activated.

◆ Timer() [2/2]

sc::Timer::Timer ( const Ref< RegionTimer > &  ,
const char *  name 
)

Start timing a region using the given RegionTimer.

If a null name pointer is given, then the timer will not be activated.

Member Function Documentation

◆ reset()

void sc::Timer::reset ( const char *  = 0)

Stop timing the current region, if active.

If a new region name is passed in, start timing with that name. If no region name is given, the Timer will be deactivated.


The documentation for this class was generated from the following file:

Generated at Sun Jan 26 2020 23:33:10 for MPQC 2.3.1 using the documentation package Doxygen 1.8.16.