![]() |
mutable
A Database System for Research and Fast Prototyping
|
#include <Timer.hpp>
Public Member Functions | |
Measurement (std::string name, time_point begin=time_point(), time_point end=time_point()) | |
void | clear () |
Clear this Measurement , rendering it unused. | |
void | start () |
Start this Measurement by setting the start time point to NOW. | |
void | stop () |
Stop this Measurement by setting the end time point to NOW. | |
bool | is_unused () const |
Returns true iff the Measurement is unused, i.e. | |
bool | has_started () const |
Returns true iff this Measurement has begun. | |
bool | has_ended () const |
Returns true iff this Measurement has ended. | |
bool | is_active () const |
Returns true iff this Measurement is currently in process. | |
bool | is_finished () const |
Returns true iff this Measurement has completed. | |
duration | duration () const |
Returns the duration of a finished Measurement . | |
void | dump (std::ostream &out) const |
void | dump () const |
Data Fields | |
std::string | name |
the name of this Measurement | |
time_point | begin |
time_point | end |
the begin and end time points of this Measurement | |
Friends | |
std::ostream & | operator<< (std::ostream &out, const Measurement &M) |
|
inlineexplicit |
|
inline |
Clear this Measurement
, rendering it unused.
void Timer::Measurement::dump | ( | ) | const |
Definition at line 24 of file Timer.cpp.
References m::Timer::dump().
|
inline |
Returns the duration of a finished Measurement
.
Definition at line 85 of file Timer.hpp.
References begin, end, is_finished(), and M_insist.
|
inline |
Returns true
iff this Measurement
has ended.
Definition at line 78 of file Timer.hpp.
References end.
Referenced by is_active(), is_finished(), and is_unused().
|
inline |
Returns true
iff this Measurement
has begun.
Definition at line 76 of file Timer.hpp.
References begin.
Referenced by is_active(), is_finished(), and is_unused().
|
inline |
Returns true
iff this Measurement
is currently in process.
Definition at line 80 of file Timer.hpp.
References m::and, has_ended(), and has_started().
Referenced by stop().
|
inline |
Returns true
iff this Measurement
has completed.
Definition at line 82 of file Timer.hpp.
References m::and, has_ended(), and has_started().
Referenced by duration().
|
inline |
Returns true
iff the Measurement
is unused, i.e.
has not started (and hence also not finished).
Definition at line 70 of file Timer.hpp.
References has_ended(), has_started(), and M_insist.
Referenced by start().
|
inline |
Start this Measurement
by setting the start time point to NOW.
Definition at line 58 of file Timer.hpp.
References begin, is_unused(), and M_insist.
|
inline |
Stop this Measurement
by setting the end time point to NOW.
Definition at line 64 of file Timer.hpp.
References end, is_active(), and M_insist.
|
friend |
time_point m::Timer::Measurement::begin |
Definition at line 46 of file Timer.hpp.
Referenced by clear(), duration(), has_started(), and start().
time_point m::Timer::Measurement::end |
the begin and end time points of this Measurement
Definition at line 46 of file Timer.hpp.
Referenced by clear(), duration(), has_ended(), and stop().
std::string m::Timer::Measurement::name |
the name of this Measurement