- Main Page
- Namespaces
- Classes
- Files

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

# Ipopt::TimedTask Class Reference

This class is used to collect timing information for a particular task. More...

`#include <IpTimedTask.hpp>`

List of all members.

## Public Member Functions
void | Reset ()
| Method for resetting time to zero.
void | Start ()
| Method that is called before execution of the task.
void | End ()
| Method that is called after execution of the task.
void | EndIfStarted ()
| Method that is called after execution of the task for which timing might have been started.
Number | TotalTime () const
| Method returning total time spend for task so far.
Constructors/Destructors
| TimedTask ()
| Default constructor.
| ~TimedTask ()
| Default destructor.
## Static Public Member Functions
static Number | CpuTime ()
| method determining CPU executed since start of program
## Private Member Functions
Default Compiler Generated Methods (Hidden to avoid
implicit creation/calling). These methods are not implemented and we do not want the compiler to implement them for us, so we declare them private and do not define them. This ensures that they will not be implicitly created/called.
| TimedTask (const TimedTask &)
| Copy Constructor.
void | operator= (const TimedTask &)
| Overloaded Equals Operator.
## Private Attributes
Number | start_time_
| Time at beginning of task.
Number | total_time_
| Total time for task measured so far.
fields for debugging
bool | start_called_
bool | end_called_

## Detailed Description

This class is used to collect timing information for a particular task.

Definition at line 41 of file IpTimedTask.hpp.

## Constructor & Destructor Documentation

Ipopt::TimedTask::TimedTask | ( |  | ) | `[inline]`

Default constructor.

Definition at line 47 of file IpTimedTask.hpp.

Ipopt::TimedTask::~TimedTask | ( |  | ) | `[inline]`

Default destructor.

Definition at line 55 of file IpTimedTask.hpp.

Ipopt::TimedTask::TimedTask | ( | const TimedTask & |  | ) | `[private]`

Copy Constructor.

## Member Function Documentation

void Ipopt::TimedTask::Reset | ( |  | ) | `[inline]`

Method for resetting time to zero.

Definition at line 60 of file IpTimedTask.hpp.

References end_called_, start_called_, and total_time_.

void Ipopt::TimedTask::Start | ( |  | ) | `[inline]`

Method that is called before execution of the task.

Definition at line 68 of file IpTimedTask.hpp.

References CpuTime(), DBG_ASSERT, end_called_, start_called_, and start_time_.

void Ipopt::TimedTask::End | ( |  | ) | `[inline]`

Method that is called after execution of the task.

Definition at line 78 of file IpTimedTask.hpp.

References CpuTime(), DBG_ASSERT, end_called_, start_called_, start_time_, and total_time_.

void Ipopt::TimedTask::EndIfStarted | ( |  | ) | `[inline]`

Method that is called after execution of the task for which timing might have been started.

This only updates the timing if the timing has indeed been conducted. This is useful to stop timing after catching exceptions.

Definition at line 91 of file IpTimedTask.hpp.

References CpuTime(), DBG_ASSERT, end_called_, start_called_, start_time_, and total_time_.

Number Ipopt::TimedTask::TotalTime | ( |  | ) | const`[inline]`

Method returning total time spend for task so far.

Definition at line 102 of file IpTimedTask.hpp.

References DBG_ASSERT, end_called_, and total_time_.

static Number Ipopt::TimedTask::CpuTime | ( |  | ) | `[inline, static]`

method determining CPU executed since start of program

Definition at line 110 of file IpTimedTask.hpp.

Referenced by End(), EndIfStarted(), and Start().

void Ipopt::TimedTask::operator= | ( | const TimedTask & |  | ) | `[private]`

Overloaded Equals Operator.

## Member Data Documentation

Number Ipopt::TimedTask::start_time_`[private]`

Time at beginning of task.

Definition at line 147 of file IpTimedTask.hpp.

Referenced by End(), EndIfStarted(), and Start().

Number Ipopt::TimedTask::total_time_`[private]`

Total time for task measured so far.

Definition at line 149 of file IpTimedTask.hpp.

Referenced by End(), EndIfStarted(), Reset(), and TotalTime().

bool Ipopt::TimedTask::start_called_`[private]`

Definition at line 153 of file IpTimedTask.hpp.

Referenced by End(), EndIfStarted(), Reset(), and Start().

bool Ipopt::TimedTask::end_called_`[private]`

Definition at line 154 of file IpTimedTask.hpp.

Referenced by End(), EndIfStarted(), Reset(), Start(), and TotalTime().

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

- /home/coin/SVN-release/Ipopt-3.5.1/Ipopt/src/Common/IpTimedTask.hpp