#include <debug.h>
Collaboration diagram for CVC3::DebugTimer:
Intended use is to store time intervals or accumulated time for multiple events (e.g. time spent to execute certain lines of code, or accumulated time spent in a particular function).
Definition at line 248 of file debug.h.
CVC3::DebugTimer::DebugTimer | ( | DebugTime * | time, | |
bool | take_time = false | |||
) | [inline] |
Constructor: takes the pointer to the actual time value.
It is either stored in class Debug below (then the timer is "public"), or we own it, making the timer "private".
Definition at line 256 of file debug.h.
Referenced by operator+(), and operator-().
CVC3::DebugTimer::DebugTimer | ( | const DebugTimer & | timer | ) |
Copy constructor: copy the *pointer* from public timers, and *value* from private.
The reason for different behavior for public and private time is the following. When you modify a public timer, you want the changes to show in the central database and everywhere else, whereas private timers are used as independent temporary variables holding intermediate time values.
Definition at line 158 of file debug.cpp.
References d_clean_time, and d_time.
CVC3::DebugTimer::~DebugTimer | ( | ) |
DebugTimer & CVC3::DebugTimer::operator= | ( | const DebugTimer & | timer | ) |
Assignment: same logistics as for the copy constructor.
Definition at line 171 of file debug.cpp.
References d_clean_time, and d_time.
void CVC3::DebugTimer::reset | ( | ) |
Set time to zero.
Definition at line 193 of file debug.cpp.
References d_time, and CVC3::DebugTime::reset().
DebugTimer & CVC3::DebugTimer::operator+= | ( | const DebugTimer & | timer | ) |
DebugTimer & CVC3::DebugTimer::operator-= | ( | const DebugTimer & | timer | ) |
DebugTimer CVC3::DebugTimer::operator+ | ( | const DebugTimer & | timer | ) |
Produces new "private" timer.
Definition at line 208 of file debug.cpp.
References d_time, and DebugTimer().
DebugTimer CVC3::DebugTimer::operator- | ( | const DebugTimer & | timer | ) |
Produces new "private" timer.
Definition at line 213 of file debug.cpp.
References d_time, and DebugTimer().
bool operator== | ( | const DebugTimer & | t1, | |
const DebugTimer & | t2 | |||
) | [friend] |
bool operator!= | ( | const DebugTimer & | t1, | |
const DebugTimer & | t2 | |||
) | [friend] |
bool operator< | ( | const DebugTimer & | t1, | |
const DebugTimer & | t2 | |||
) | [friend] |
bool operator> | ( | const DebugTimer & | t1, | |
const DebugTimer & | t2 | |||
) | [friend] |
bool operator<= | ( | const DebugTimer & | t1, | |
const DebugTimer & | t2 | |||
) | [friend] |
bool operator>= | ( | const DebugTimer & | t1, | |
const DebugTimer & | t2 | |||
) | [friend] |
std::ostream& operator<< | ( | std::ostream & | os, | |
const DebugTimer & | timer | |||
) | [friend] |
DebugTime* CVC3::DebugTimer::d_time [private] |
The time value.
Definition at line 250 of file debug.h.
Referenced by DebugTimer(), CVC3::operator!=(), operator+(), operator+=(), operator-(), operator-=(), CVC3::operator<(), CVC3::operator<<(), CVC3::operator<=(), operator=(), CVC3::operator==(), CVC3::operator>(), CVC3::operator>=(), reset(), CVC3::Debug::setCurrentTime(), CVC3::Debug::setElapsed(), and ~DebugTimer().
bool CVC3::DebugTimer::d_clean_time [private] |
Set if we own *d_time.
Definition at line 251 of file debug.h.
Referenced by DebugTimer(), operator=(), and ~DebugTimer().