#include <Teuchos_Time.hpp>
Public Member Functions | |
| Time (const string &name, bool start=false) | |
| Construct with a descriptive name. | |
| void | start (bool reset=false) |
| Starts the timer. | |
| double | stop () |
| Stops the timer. | |
| double | totalElapsedTime (bool readCurrentTime=false) const |
| Returns the total time accumulated by this timer. This should be called only when the clock is stopped.. | |
| void | reset () |
| Resets the cummulative time and number of times this timer has been called. Does not affect any other state. | |
| bool | isRunning () const |
| Indicates if this timer is currently running, i.e., if it has been started but not yet stopped. | |
| const string & | name () const |
| Return the name of this timer. | |
| void | incrementNumCalls () |
| Increment the number of times this timer has been called. | |
| int | numCalls () const |
| Return the number of times this timer has been called. | |
Static Public Member Functions | |
| double | wallTime () |
| Returns current wall-clock time in seconds. | |
To time a section of code, place it in between calls to start() and stop().
Definition at line 77 of file Teuchos_Time.hpp.
|
||||||||||||
|
Construct with a descriptive name.
Definition at line 65 of file Teuchos_Time.cpp. |
|
|
Returns current wall-clock time in seconds.
Definition at line 96 of file Teuchos_Time.cpp. |
|
|
Starts the timer.
Definition at line 71 of file Teuchos_Time.cpp. |
|
|
Stops the timer.
Definition at line 78 of file Teuchos_Time.cpp. |
|
|
Returns the total time accumulated by this timer. This should be called only when the clock is stopped..
Definition at line 88 of file Teuchos_Time.cpp. |
|
|
Resets the cummulative time and number of times this timer has been called. Does not affect any other state.
Definition at line 99 of file Teuchos_Time.hpp. |
|
|
Indicates if this timer is currently running, i.e., if it has been started but not yet stopped. It is necessary to know if a timer is running to avoid incorrectly starting or stopping in reentrant code. Definition at line 106 of file Teuchos_Time.hpp. |
|
|
Return the name of this timer.
Definition at line 109 of file Teuchos_Time.hpp. |
|
|
Increment the number of times this timer has been called.
Definition at line 112 of file Teuchos_Time.hpp. |
|
|
Return the number of times this timer has been called.
Definition at line 115 of file Teuchos_Time.hpp. |
1.3.9.1