\hypertarget{a01308}{\section{Open\+Mesh\+:\+:Utils\+:\+:Timer Class Reference}
\label{a01308}\index{Open\+Mesh\+::\+Utils\+::\+Timer@{Open\+Mesh\+::\+Utils\+::\+Timer}}
}


{\ttfamily \#include $<$libs\+\_\+required/\+Open\+Mesh/src/\+Open\+Mesh/\+Tools/\+Utils/\+Timer.\+hh$>$}

\subsection*{Public Types}
\begin{DoxyCompactItemize}
\item 
\hypertarget{a01308_a129372ccc43d66a01dd92e635b8419fd}{enum \hyperlink{a01308_a129372ccc43d66a01dd92e635b8419fd}{Format} \{ \\*
{\bfseries Automatic}, 
{\bfseries Long}, 
{\bfseries Hours}, 
{\bfseries Minutes}, 
\\*
{\bfseries Seconds}, 
{\bfseries H\+Seconds}, 
{\bfseries M\+Seconds}, 
{\bfseries Micro\+Seconds}, 
\\*
{\bfseries Nano\+Seconds}
 \}}\label{a01308_a129372ccc43d66a01dd92e635b8419fd}

\begin{DoxyCompactList}\small\item\em Formatting options for member \hyperlink{a01308_ab44e5c7c811608d5bb1b1c2ed01537f4}{Timer\+::as\+\_\+string()} \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hypertarget{a01308_ae0fcca1dc33c55ceb3b7e23161c8b5de}{bool \hyperlink{a01308_ae0fcca1dc33c55ceb3b7e23161c8b5de}{is\+\_\+valid} () const }\label{a01308_ae0fcca1dc33c55ceb3b7e23161c8b5de}

\begin{DoxyCompactList}\small\item\em Returns true if self is in a valid state! \end{DoxyCompactList}\item 
\hypertarget{a01308_ab5f1ec32173f44c7cb0ef3e2e3aaa3ea}{bool {\bfseries is\+\_\+stopped} () const }\label{a01308_ab5f1ec32173f44c7cb0ef3e2e3aaa3ea}

\item 
\hypertarget{a01308_a174c57407878fc5bed802ffdeed1afd5}{void \hyperlink{a01308_a174c57407878fc5bed802ffdeed1afd5}{reset} (void)}\label{a01308_a174c57407878fc5bed802ffdeed1afd5}

\begin{DoxyCompactList}\small\item\em Reset the timer. \end{DoxyCompactList}\item 
\hypertarget{a01308_adf99f0a73fa4dd9f7cc9a4f132960c99}{void \hyperlink{a01308_adf99f0a73fa4dd9f7cc9a4f132960c99}{start} (void)}\label{a01308_adf99f0a73fa4dd9f7cc9a4f132960c99}

\begin{DoxyCompactList}\small\item\em Start measurement. \end{DoxyCompactList}\item 
\hypertarget{a01308_a43e848664e0f2d1a8277c9b82b406ba1}{void \hyperlink{a01308_a43e848664e0f2d1a8277c9b82b406ba1}{stop} (void)}\label{a01308_a43e848664e0f2d1a8277c9b82b406ba1}

\begin{DoxyCompactList}\small\item\em Stop measurement. \end{DoxyCompactList}\item 
\hypertarget{a01308_a3ccf2b49df363bde2d0b9ee252360834}{void \hyperlink{a01308_a3ccf2b49df363bde2d0b9ee252360834}{cont} (void)}\label{a01308_a3ccf2b49df363bde2d0b9ee252360834}

\begin{DoxyCompactList}\small\item\em Continue measurement. \end{DoxyCompactList}\item 
\hypertarget{a01308_a232f7e145358544eb3a6dfa96f78ff05}{float \hyperlink{a01308_a232f7e145358544eb3a6dfa96f78ff05}{resolution} () const }\label{a01308_a232f7e145358544eb3a6dfa96f78ff05}

\begin{DoxyCompactList}\small\item\em Give resolution of timer. Depends on the underlying measurement method. \end{DoxyCompactList}\item 
\hypertarget{a01308_aab5ce7495ca5c4a0cb77b2895168a71f}{double \hyperlink{a01308_aab5ce7495ca5c4a0cb77b2895168a71f}{seconds} (void) const }\label{a01308_aab5ce7495ca5c4a0cb77b2895168a71f}

\begin{DoxyCompactList}\small\item\em Returns measured time in seconds, if the timer is in state 'Stopped'. \end{DoxyCompactList}\item 
\hypertarget{a01308_ad806a26f5efa8bf9460a49f060cea634}{double \hyperlink{a01308_ad806a26f5efa8bf9460a49f060cea634}{hseconds} (void) const }\label{a01308_ad806a26f5efa8bf9460a49f060cea634}

\begin{DoxyCompactList}\small\item\em Returns measured time in hundredth seconds, if the timer is in state 'Stopped'. \end{DoxyCompactList}\item 
\hypertarget{a01308_ab11f13fea85d4ad7032ceba663e459dc}{double \hyperlink{a01308_ab11f13fea85d4ad7032ceba663e459dc}{mseconds} (void) const }\label{a01308_ab11f13fea85d4ad7032ceba663e459dc}

\begin{DoxyCompactList}\small\item\em Returns measured time in milli seconds, if the timer is in state 'Stopped'. \end{DoxyCompactList}\item 
\hypertarget{a01308_a40b5d7064e75a6ba1bf62bf85d6f4faa}{double \hyperlink{a01308_a40b5d7064e75a6ba1bf62bf85d6f4faa}{useconds} (void) const }\label{a01308_a40b5d7064e75a6ba1bf62bf85d6f4faa}

\begin{DoxyCompactList}\small\item\em Returns measured time in micro seconds, if the timer is in state 'Stopped'. \end{DoxyCompactList}\item 
std\+::string \hyperlink{a01308_ab44e5c7c811608d5bb1b1c2ed01537f4}{as\+\_\+string} (\hyperlink{a01308_a129372ccc43d66a01dd92e635b8419fd}{Format} format=Automatic)
\end{DoxyCompactItemize}
{\bf }\par
\begin{DoxyCompactItemize}
\item 
\hypertarget{a01308_a94d732bfda994499d267b698ef0e7668}{bool \hyperlink{a01308_a94d732bfda994499d267b698ef0e7668}{operator$<$} (const \hyperlink{a01308}{Timer} \&t2) const }\label{a01308_a94d732bfda994499d267b698ef0e7668}

\begin{DoxyCompactList}\small\item\em Compare timer values. \end{DoxyCompactList}\item 
\hypertarget{a01308_ad4de2550591b55e4c637c221850521cb}{bool \hyperlink{a01308_ad4de2550591b55e4c637c221850521cb}{operator$>$} (const \hyperlink{a01308}{Timer} \&t2) const }\label{a01308_ad4de2550591b55e4c637c221850521cb}

\begin{DoxyCompactList}\small\item\em Compare timer values. \end{DoxyCompactList}\item 
\hypertarget{a01308_a0a4a37bea9f5d52a8b9324e21fb50c07}{bool \hyperlink{a01308_a0a4a37bea9f5d52a8b9324e21fb50c07}{operator==} (const \hyperlink{a01308}{Timer} \&t2) const }\label{a01308_a0a4a37bea9f5d52a8b9324e21fb50c07}

\begin{DoxyCompactList}\small\item\em Compare timer values. \end{DoxyCompactList}\item 
\hypertarget{a01308_a014f59ea8563bc8cf99fdf5cb0ee9fd2}{bool \hyperlink{a01308_a014f59ea8563bc8cf99fdf5cb0ee9fd2}{operator$<$=} (const \hyperlink{a01308}{Timer} \&t2) const }\label{a01308_a014f59ea8563bc8cf99fdf5cb0ee9fd2}

\begin{DoxyCompactList}\small\item\em Compare timer values. \end{DoxyCompactList}\item 
\hypertarget{a01308_a9b42678411f985c8ec4aa6a37c73fc96}{bool \hyperlink{a01308_a9b42678411f985c8ec4aa6a37c73fc96}{operator$>$=} (const \hyperlink{a01308}{Timer} \&t2) const }\label{a01308_a9b42678411f985c8ec4aa6a37c73fc96}

\begin{DoxyCompactList}\small\item\em Compare timer values. \end{DoxyCompactList}\end{DoxyCompactItemize}

\subsection*{Static Public Member Functions}
\begin{DoxyCompactItemize}
\item 
static std\+::string \hyperlink{a01308_a2c8f0e06e5011eab302725e64da1e913}{as\+\_\+string} (double \hyperlink{a01308_aab5ce7495ca5c4a0cb77b2895168a71f}{seconds}, \hyperlink{a01308_a129372ccc43d66a01dd92e635b8419fd}{Format} format=Automatic)
\end{DoxyCompactItemize}
\subsection*{Protected Types}
\begin{DoxyCompactItemize}
\item 
\hypertarget{a01308_ae6625e062942b87167c63f30f8f7e011}{enum \{ {\bfseries Invalid} = -\/1, 
{\bfseries Stopped} = 0, 
{\bfseries Running} = 1
 \}}\label{a01308_ae6625e062942b87167c63f30f8f7e011}

\end{DoxyCompactItemize}
\subsection*{Protected Attributes}
\begin{DoxyCompactItemize}
\item 
\hypertarget{a01308_aa54775d02c0973d5793683801ad9418f}{Timer\+Impl $\ast$ {\bfseries impl\+\_\+}}\label{a01308_aa54775d02c0973d5793683801ad9418f}

\item 
\hypertarget{a01308_a59d074876c2476fe756e8c5bb031fda2}{enum Open\+Mesh\+::\+Utils\+::\+Timer\+:: \{ ... \}  {\bfseries state\+\_\+}}\label{a01308_a59d074876c2476fe756e8c5bb031fda2}

\end{DoxyCompactItemize}
\subsection*{Related Functions}
(Note that these are not member functions.) \begin{DoxyCompactItemize}
\item 
std\+::ostream \& \hyperlink{a01308_a48f6b3535fcd618dc0ffb43b6ebe6a01}{operator$<$$<$} (std\+::ostream \&\+\_\+o, const \hyperlink{a01308}{Timer} \&\+\_\+t)
\end{DoxyCompactItemize}


\subsection{Detailed Description}
\hyperlink{a01308}{Timer} class 

Definition at line 87 of file Timer.\+hh.



\subsection{Member Function Documentation}
\hypertarget{a01308_ab44e5c7c811608d5bb1b1c2ed01537f4}{\index{Open\+Mesh\+::\+Utils\+::\+Timer@{Open\+Mesh\+::\+Utils\+::\+Timer}!as\+\_\+string@{as\+\_\+string}}
\index{as\+\_\+string@{as\+\_\+string}!Open\+Mesh\+::\+Utils\+::\+Timer@{Open\+Mesh\+::\+Utils\+::\+Timer}}
\subsubsection[{as\+\_\+string}]{\setlength{\rightskip}{0pt plus 5cm}std\+::string Open\+Mesh\+::\+Utils\+::\+Timer\+::as\+\_\+string (
\begin{DoxyParamCaption}
\item[{{\bf Format}}]{format = {\ttfamily Automatic}}
\end{DoxyParamCaption}
)}}\label{a01308_ab44e5c7c811608d5bb1b1c2ed01537f4}
Returns the measured time as a string. Use the format flags to specify a wanted resolution. \hypertarget{a01308_a2c8f0e06e5011eab302725e64da1e913}{\index{Open\+Mesh\+::\+Utils\+::\+Timer@{Open\+Mesh\+::\+Utils\+::\+Timer}!as\+\_\+string@{as\+\_\+string}}
\index{as\+\_\+string@{as\+\_\+string}!Open\+Mesh\+::\+Utils\+::\+Timer@{Open\+Mesh\+::\+Utils\+::\+Timer}}
\subsubsection[{as\+\_\+string}]{\setlength{\rightskip}{0pt plus 5cm}static std\+::string Open\+Mesh\+::\+Utils\+::\+Timer\+::as\+\_\+string (
\begin{DoxyParamCaption}
\item[{double}]{seconds, }
\item[{{\bf Format}}]{format = {\ttfamily Automatic}}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [static]}}}\label{a01308_a2c8f0e06e5011eab302725e64da1e913}
Returns a given measured time as a string. Use the format flags to specify a wanted resolution. 

\subsection{Friends And Related Function Documentation}
\hypertarget{a01308_a48f6b3535fcd618dc0ffb43b6ebe6a01}{\index{Open\+Mesh\+::\+Utils\+::\+Timer@{Open\+Mesh\+::\+Utils\+::\+Timer}!operator$<$$<$@{operator$<$$<$}}
\index{operator$<$$<$@{operator$<$$<$}!Open\+Mesh\+::\+Utils\+::\+Timer@{Open\+Mesh\+::\+Utils\+::\+Timer}}
\subsubsection[{operator$<$$<$}]{\setlength{\rightskip}{0pt plus 5cm}std\+::ostream \& operator$<$$<$ (
\begin{DoxyParamCaption}
\item[{std\+::ostream \&}]{\+\_\+o, }
\item[{const {\bf Timer} \&}]{\+\_\+t}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [related]}}}\label{a01308_a48f6b3535fcd618dc0ffb43b6ebe6a01}
Write seconds to output stream. \hyperlink{a01308}{Timer} must be stopped before. 

Definition at line 201 of file Timer.\+hh.



The documentation for this class was generated from the following file\+:\begin{DoxyCompactItemize}
\item 
libs\+\_\+required/\+Open\+Mesh/src/\+Open\+Mesh/\+Tools/\+Utils/\hyperlink{a02087}{Timer.\+hh}\end{DoxyCompactItemize}
