Teuchos::TimeMonitor Class Reference

A timer class that starts when constructed and stops when the destructor is called. More...

#include <Teuchos_TimeMonitor.hpp>

Inheritance diagram for Teuchos::TimeMonitor:

Teuchos::PerformanceMonitorBase< Time > List of all members.

Public Member Functions

 TimeMonitor (Time &timer, bool reset=false)
 Constructor starts timer.
 ~TimeMonitor ()
 Destructor causes timer to stop.

Static Public Member Functions

Teuchos::RefCountPtr< TimegetNewTimer (const string &name)
void summarize (ostream &out=std::cout, bool alwaysWriteLocal=false, bool writeGlobalStats=true)
 Print summary statistics for a group of timers. Timings are gathered from all processors.

Detailed Description

A timer class that starts when constructed and stops when the destructor is called.

Termination upon destruction lets this timer behave correctly even if scope is exited because of an exception.

Note:
Teuchos::TimeMonitor uses the Teuchos::Time class internally.
Examples:

TimeMonitor/cxx_main.cpp.

Definition at line 98 of file Teuchos_TimeMonitor.hpp.


Constructor & Destructor Documentation

Teuchos::TimeMonitor::TimeMonitor Time timer,
bool  reset = false
[inline]
 

Constructor starts timer.

Definition at line 103 of file Teuchos_TimeMonitor.hpp.

Teuchos::TimeMonitor::~TimeMonitor  )  [inline]
 

Destructor causes timer to stop.

Definition at line 110 of file Teuchos_TimeMonitor.hpp.


Member Function Documentation

Teuchos::RefCountPtr<Time> Teuchos::TimeMonitor::getNewTimer const string &  name  )  [inline, static]
 

Wrapping of getNewCounter() for backwards compatibiity with old code

Examples:
TimeMonitor/cxx_main.cpp.

Definition at line 116 of file Teuchos_TimeMonitor.hpp.

void TimeMonitor::summarize ostream &  out = std::cout,
bool  alwaysWriteLocal = false,
bool  writeGlobalStats = true
[static]
 

Print summary statistics for a group of timers. Timings are gathered from all processors.

Note:
This method must be called by all processors
Examples:
TimeMonitor/cxx_main.cpp.

Definition at line 39 of file Teuchos_TimeMonitor.cpp.


The documentation for this class was generated from the following files:
Generated on Thu Sep 18 12:30:33 2008 for Teuchos - Trilinos Tools Package by doxygen 1.3.9.1