![]() |
OpenMesh
|
#include <OpenMesh/Tools/Utils/Timer.hh>
Public Types | |
| enum | Format { Automatic, Long, Hours, Minutes, Seconds, HSeconds, MSeconds, MicroSeconds, NanoSeconds } |
| Formatting options for member Timer::as_string() | |
Public Member Functions | |
| bool | is_valid () const |
| Returns true if self is in a valid state! | |
| bool | is_stopped () const |
| void | reset (void) |
| Reset the timer. | |
| void | start (void) |
| Start measurement. | |
| void | stop (void) |
| Stop measurement. | |
| void | cont (void) |
| Continue measurement. | |
| 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'. | |
| double | hseconds (void) const |
| Returns measured time in hundredth seconds, if the timer is in state 'Stopped'. | |
| double | mseconds (void) const |
| Returns measured time in milli seconds, if the timer is in state 'Stopped'. | |
| double | useconds (void) const |
| Returns measured time in micro seconds, if the timer is in state 'Stopped'. | |
| std::string | as_string (Format format=Automatic) |
| Returns the measured time as a string. More... | |
| bool | operator< (const Timer &t2) const |
| Compare timer values. | |
| bool | operator> (const Timer &t2) const |
| Compare timer values. | |
| bool | operator== (const Timer &t2) const |
| Compare timer values. | |
| bool | operator<= (const Timer &t2) const |
| Compare timer values. | |
| bool | operator>= (const Timer &t2) const |
| Compare timer values. | |
Static Public Member Functions | |
| static std::string | as_string (double seconds, Format format=Automatic) |
| Returns a given measured time as a string. More... | |
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) |
| Write seconds to output stream. More... | |
Timer class.
| 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.
|
static |
Returns a given measured time as a string.
Use the format flags to specify a wanted resolution.
|
related |
Write seconds to output stream.
Timer must be stopped before.