55#include <OpenMesh/Core/System/config.hh>
59#if defined(OM_CC_MIPS)
82class OPENMESHDLLEXPORT Timer
102 Timer(
const Timer& _other) =
delete;
112 bool is_stopped()
const {
return state_==Stopped; }
157 bool operator < (
const Timer& t2)
const
159 assert( is_stopped() && t2.is_stopped() );
163 bool operator > (
const Timer& t2)
const
165 assert( is_stopped() && t2.is_stopped() );
166 return (seconds() > t2.
seconds());
169 bool operator == (
const Timer& t2)
const
171 assert( is_stopped() && t2.is_stopped() );
172 return (seconds() == t2.
seconds());
175 bool operator <= (
const Timer& t2)
const
177 assert( is_stopped() && t2.is_stopped() );
178 return (seconds() <= t2.
seconds());
181 bool operator >=(
const Timer& t2)
const
183 assert( is_stopped() && t2.is_stopped() );
184 return (seconds() >= t2.
seconds());
205inline std::ostream&
operator << (std::ostream& _o,
const Timer& _t)
Contains all the mesh ingredients like the polygonal mesh, the triangle mesh, different mesh kernels ...
Definition MeshItems.hh:59
Collection of little utility classes and helpers.
Timer class.
Definition Timer.hh:83
double hseconds(void) const
Returns measured time in hundredth seconds, if the timer is in state 'Stopped'.
Definition Timer.hh:133
Format
Formatting options for member Timer::as_string()
Definition Timer.hh:87
void reset(void)
Reset the timer.
double mseconds(void) const
Returns measured time in milli seconds, if the timer is in state 'Stopped'.
Definition Timer.hh:136
static std::string as_string(double seconds, Format format=Automatic)
Returns a given measured time as a string.
void cont(void)
Continue measurement.
void stop(void)
Stop measurement.
std::ostream & operator<<(std::ostream &_o, const Timer &_t)
Write seconds to output stream.
Definition Timer.hh:205
Timer & operator=(const Timer &)=delete
Make the timer non copyable.
double useconds(void) const
Returns measured time in micro seconds, if the timer is in state 'Stopped'.
Definition Timer.hh:139
Timer(const Timer &_other)=delete
Make the timer non copyable.
float resolution() const
Give resolution of timer. Depends on the underlying measurement method.
double seconds(void) const
Returns measured time in seconds, if the timer is in state 'Stopped'.
std::string as_string(Format format=Automatic)
Returns the measured time as a string.
void start(void)
Start measurement.
bool is_valid() const
Returns true if self is in a valid state!
Definition Timer.hh:110
Timer class.
Definition Timer.hh:83
double seconds(void) const
Returns measured time in seconds, if the timer is in state 'Stopped'.