- Main Page
- Modules
- Namespaces
- Classes
- Files
- Related Pages

- Alphabetical List
- Class List
- Class Hierarchy
- Class Members

# ScopedTimer Class Reference

Allow the timing of a task within a scope. More...

List of all members.

## Public Member Functions
| ScopedTimer (Timer &timer, const unsigned int i)
| Start timing a new task upon creation.
| ScopedTimer (Timer &timer, const std::string &name)
| Start timing a new task upon creation.
| ~ScopedTimer ()
| Upon destruction, stop the task on top of the timer's stack.

## Detailed Description

Allow the timing of a task within a scope.

Definition at line 290 of file timer.hh.

## Constructor & Destructor Documentation

ScopedTimer | ( | Timer & | timer,
|  | const unsigned int | i |
| ) |  |  | `[inline]`

Start timing a new task upon creation.

Parameters:

  | timer | the timer within which the task is executed.
  | i | the id of the task in the timer (must be declared).

Definition at line 112 of file timer.hxx.

ScopedTimer | ( | Timer & | timer,
|  | const std::string & | name |
| ) |  |  | `[inline]`

Start timing a new task upon creation.

Parameters:

  | timer | the timer within which the task is executed.
  | name | the name of the task in the timer (does not have to be declared yet).

Definition at line 120 of file timer.hxx.

~ScopedTimer | ( |  | ) | `[inline]`

Upon destruction, stop the task on top of the timer's stack.

It is _not_ guaranteed this task is the one started upon creation.

Definition at line 128 of file timer.hxx.