OpenMesh::Utils::Timer Class Reference

#include <Timer.hh>

List of all members.

Public Types

enum  Format {
  Automatic, Long, Hours, Minutes,
  Seconds, HSeconds, MSeconds, MicroSeconds,
  NanoSeconds
}
 

Formatting options for member Timer::as_string().

More...

Public Member Functions

std::string as_string (Format format=Automatic)
void cont (void)
 Continue measurement.
double hseconds (void) const
 Returns measured time in hundredth seconds, if the timer is in state 'Stopped'.
bool is_stopped () const
bool is_valid () const
 Returns true if self is in a valid state!
double mseconds (void) const
 Returns measured time in milli seconds, if the timer is in state 'Stopped'.
void reset (void)
 Reset the timer.
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'.
void start (void)
 Start measurement.
void stop (void)
 Stop measurement.
 Timer (void)
double useconds (void) const
 Returns measured time in micro seconds, if the timer is in state 'Stopped'.
 ~Timer (void)

bool operator< (const Timer &t2) const
 Compare timer values.
bool operator<= (const Timer &t2) const
bool operator== (const Timer &t2) const
bool operator> (const Timer &t2) const
bool operator>= (const Timer &t2) const

Static Public Member Functions

static std::string as_string (double seconds, Format format=Automatic)

Protected Types

enum  { Invalid = -1, Stopped = 0, Running = 1 }

Protected Attributes

TimerImpl * impl_
enum OpenMesh::Utils::Timer:: { ... }  state_

Related Functions

(Note that these are not member functions.)



std::ostream & operator<< (std::ostream &_o, const Timer &_t)

Detailed Description

Timer class

Definition at line 80 of file Timer.hh.


Member Enumeration Documentation

anonymous enum [protected]
Enumerator:
Invalid 
Stopped 
Running 

Definition at line 181 of file Timer.hh.

Formatting options for member Timer::as_string().

Enumerator:
Automatic 
Long 
Hours 
Minutes 
Seconds 
HSeconds 
MSeconds 
MicroSeconds 
NanoSeconds 

Definition at line 85 of file Timer.hh.


Constructor & Destructor Documentation

OpenMesh::Utils::Timer::Timer ( void   ) 
OpenMesh::Utils::Timer::~Timer ( void   ) 

Member Function Documentation

static std::string OpenMesh::Utils::Timer::as_string ( double  seconds,
Format  format = Automatic 
) [static]

Returns a given measured time as a string. Use the format flags to specify a wanted resolution.

std::string OpenMesh::Utils::Timer::as_string ( Format  format = Automatic  ) 

Returns the measured time as a string. Use the format flags to specify a wanted resolution.

void OpenMesh::Utils::Timer::cont ( void   ) 

Continue measurement.

double OpenMesh::Utils::Timer::hseconds ( void   )  const [inline]

Returns measured time in hundredth seconds, if the timer is in state 'Stopped'.

Definition at line 124 of file Timer.hh.

bool OpenMesh::Utils::Timer::is_stopped (  )  const [inline]

Definition at line 103 of file Timer.hh.

bool OpenMesh::Utils::Timer::is_valid ( void   )  const [inline]

Returns true if self is in a valid state!

Definition at line 101 of file Timer.hh.

double OpenMesh::Utils::Timer::mseconds ( void   )  const [inline]

Returns measured time in milli seconds, if the timer is in state 'Stopped'.

Definition at line 127 of file Timer.hh.

bool OpenMesh::Utils::Timer::operator< ( const Timer t2  )  const [inline]

Compare timer values.

Definition at line 146 of file Timer.hh.

bool OpenMesh::Utils::Timer::operator<= ( const Timer t2  )  const [inline]

Definition at line 164 of file Timer.hh.

bool OpenMesh::Utils::Timer::operator== ( const Timer t2  )  const [inline]

Definition at line 158 of file Timer.hh.

bool OpenMesh::Utils::Timer::operator> ( const Timer t2  )  const [inline]

Definition at line 152 of file Timer.hh.

bool OpenMesh::Utils::Timer::operator>= ( const Timer t2  )  const [inline]

Definition at line 170 of file Timer.hh.

void OpenMesh::Utils::Timer::reset ( void   ) 

Reset the timer.

float OpenMesh::Utils::Timer::resolution (  )  const

Give resolution of timer. Depends on the underlying measurement method.

double OpenMesh::Utils::Timer::seconds ( void   )  const

Returns measured time in seconds, if the timer is in state 'Stopped'.

void OpenMesh::Utils::Timer::start ( void   ) 

Start measurement.

void OpenMesh::Utils::Timer::stop ( void   ) 

Stop measurement.

double OpenMesh::Utils::Timer::useconds ( void   )  const [inline]

Returns measured time in micro seconds, if the timer is in state 'Stopped'.

Definition at line 130 of file Timer.hh.


Friends And Related Function Documentation

std::ostream & operator<< ( std::ostream &  _o,
const Timer _t 
) [related]

Write seconds to output stream. Timer must be stopped before.

Definition at line 194 of file Timer.hh.


Member Data Documentation

TimerImpl* OpenMesh::Utils::Timer::impl_ [protected]

Definition at line 179 of file Timer.hh.

enum { ... } OpenMesh::Utils::Timer::state_ [protected]

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines


openmesh
Author(s): Benjamin Pitzer
autogenerated on Fri Jan 11 12:11:21 2013