13#ifndef _TEUCHOS_TIME_HPP_
14#define _TEUCHOS_TIME_HPP_
26#if ICL || defined(_WIN32)
31#include <sys/resource.h>
53class TEUCHOSCORE_LIB_DLL_EXPORT
Time {
102 double totalElapsedTime (
bool readCurrentTime =
false)
const;
117 const std::string&
name()
const {
123 void incrementNumCalls();
135#ifdef HAVE_TEUCHOS_TIME_MASSIF_SNAPSHOTS
139 int numCallsMassifSnapshots_;
Teuchos header file which uses auto-configuration information to include necessary C++ headers.
int numCalls() const
The number of times this timer has been called while enabled.
bool isEnabled() const
Whether the timer is enabled (see disable()).
void enable()
"Enable" this timer, so that it (again) respects calls to start() and stop().
const std::string & name() const
The name of this timer.
void reset()
Reset the cummulative time and call count.
void start(bool reset=false)
Start the timer, if the timer is enabled (see disable()).
double stop()
Stop the timer, if the timer is enabled (see disable()).
bool isRunning() const
Whether the timer is currently running.
void disable()
"Disable" this timer, so that it ignores calls to start() and stop().
Time(const std::string &name, bool start=false)
Constructor.
static double wallTime()
Current wall-clock time in seconds.
The Teuchos namespace contains all of the classes, structs and enums used by Teuchos,...