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


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

\subsection*{Public Types}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{a09284_a129372ccc43d66a01dd92e635b8419fd}\label{a09284_a129372ccc43d66a01dd92e635b8419fd}} 
enum \hyperlink{a09284_a129372ccc43d66a01dd92e635b8419fd}{Format} \{ \newline
{\bfseries Automatic}, 
{\bfseries Long}, 
{\bfseries Hours}, 
{\bfseries Minutes}, 
\newline
{\bfseries Seconds}, 
{\bfseries H\+Seconds}, 
{\bfseries M\+Seconds}, 
{\bfseries Micro\+Seconds}, 
\newline
{\bfseries Nano\+Seconds}
 \}\begin{DoxyCompactList}\small\item\em Formatting options for member \hyperlink{a09284_ab44e5c7c811608d5bb1b1c2ed01537f4}{Timer\+::as\+\_\+string()} \end{DoxyCompactList}
\end{DoxyCompactItemize}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{a09284_a766990ebe73575be3fdd59f92ca8708b}\label{a09284_a766990ebe73575be3fdd59f92ca8708b}} 
{\bfseries Timer} (const \hyperlink{a09284}{Timer} \&\+\_\+other)=delete
\item 
\mbox{\Hypertarget{a09284_ae8b607f35d3ceef4a0ceff2bc0399035}\label{a09284_ae8b607f35d3ceef4a0ceff2bc0399035}} 
bool \hyperlink{a09284_ae8b607f35d3ceef4a0ceff2bc0399035}{is\+\_\+valid} () const
\begin{DoxyCompactList}\small\item\em Returns true if self is in a valid state! \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a09284_a2c9ea497a5f5390880ac9dbaca09a654}\label{a09284_a2c9ea497a5f5390880ac9dbaca09a654}} 
bool {\bfseries is\+\_\+stopped} () const
\item 
\mbox{\Hypertarget{a09284_a174c57407878fc5bed802ffdeed1afd5}\label{a09284_a174c57407878fc5bed802ffdeed1afd5}} 
void \hyperlink{a09284_a174c57407878fc5bed802ffdeed1afd5}{reset} (void)
\begin{DoxyCompactList}\small\item\em Reset the timer. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a09284_adf99f0a73fa4dd9f7cc9a4f132960c99}\label{a09284_adf99f0a73fa4dd9f7cc9a4f132960c99}} 
void \hyperlink{a09284_adf99f0a73fa4dd9f7cc9a4f132960c99}{start} (void)
\begin{DoxyCompactList}\small\item\em Start measurement. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a09284_a43e848664e0f2d1a8277c9b82b406ba1}\label{a09284_a43e848664e0f2d1a8277c9b82b406ba1}} 
void \hyperlink{a09284_a43e848664e0f2d1a8277c9b82b406ba1}{stop} (void)
\begin{DoxyCompactList}\small\item\em Stop measurement. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a09284_a3ccf2b49df363bde2d0b9ee252360834}\label{a09284_a3ccf2b49df363bde2d0b9ee252360834}} 
void \hyperlink{a09284_a3ccf2b49df363bde2d0b9ee252360834}{cont} (void)
\begin{DoxyCompactList}\small\item\em Continue measurement. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a09284_a9d62c17971cdddb8a7971fa132db247a}\label{a09284_a9d62c17971cdddb8a7971fa132db247a}} 
float \hyperlink{a09284_a9d62c17971cdddb8a7971fa132db247a}{resolution} () const
\begin{DoxyCompactList}\small\item\em Give resolution of timer. Depends on the underlying measurement method. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a09284_aa9b786d00041ac67cb23a5a83e2c21b7}\label{a09284_aa9b786d00041ac67cb23a5a83e2c21b7}} 
double \hyperlink{a09284_aa9b786d00041ac67cb23a5a83e2c21b7}{seconds} (void) const
\begin{DoxyCompactList}\small\item\em Returns measured time in seconds, if the timer is in state \textquotesingle{}Stopped\textquotesingle{}. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a09284_a11a1d5fa9c8f1386775767d03f090539}\label{a09284_a11a1d5fa9c8f1386775767d03f090539}} 
double \hyperlink{a09284_a11a1d5fa9c8f1386775767d03f090539}{hseconds} (void) const
\begin{DoxyCompactList}\small\item\em Returns measured time in hundredth seconds, if the timer is in state \textquotesingle{}Stopped\textquotesingle{}. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a09284_a2760082a4cbc4c29a5d4f85c98aa75fb}\label{a09284_a2760082a4cbc4c29a5d4f85c98aa75fb}} 
double \hyperlink{a09284_a2760082a4cbc4c29a5d4f85c98aa75fb}{mseconds} (void) const
\begin{DoxyCompactList}\small\item\em Returns measured time in milli seconds, if the timer is in state \textquotesingle{}Stopped\textquotesingle{}. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a09284_a6df963de62f906eefd4c15e2a7041f7c}\label{a09284_a6df963de62f906eefd4c15e2a7041f7c}} 
double \hyperlink{a09284_a6df963de62f906eefd4c15e2a7041f7c}{useconds} (void) const
\begin{DoxyCompactList}\small\item\em Returns measured time in micro seconds, if the timer is in state \textquotesingle{}Stopped\textquotesingle{}. \end{DoxyCompactList}\item 
std\+::string \hyperlink{a09284_ab44e5c7c811608d5bb1b1c2ed01537f4}{as\+\_\+string} (\hyperlink{a09284_a129372ccc43d66a01dd92e635b8419fd}{Format} format=Automatic)
\end{DoxyCompactItemize}
\textbf{ }\par
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{a09284_ae7043efd162d4b4bdceec184ca085139}\label{a09284_ae7043efd162d4b4bdceec184ca085139}} 
bool \hyperlink{a09284_ae7043efd162d4b4bdceec184ca085139}{operator$<$} (const \hyperlink{a09284}{Timer} \&t2) const
\begin{DoxyCompactList}\small\item\em Compare timer values. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a09284_ad26be405b7df91ff476782ccedeeff57}\label{a09284_ad26be405b7df91ff476782ccedeeff57}} 
bool \hyperlink{a09284_ad26be405b7df91ff476782ccedeeff57}{operator$>$} (const \hyperlink{a09284}{Timer} \&t2) const
\begin{DoxyCompactList}\small\item\em Compare timer values. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a09284_ad16b3068ad751218beb18c067b45fbaf}\label{a09284_ad16b3068ad751218beb18c067b45fbaf}} 
bool \hyperlink{a09284_ad16b3068ad751218beb18c067b45fbaf}{operator==} (const \hyperlink{a09284}{Timer} \&t2) const
\begin{DoxyCompactList}\small\item\em Compare timer values. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a09284_aec7d0e017944ac9d69ca3dd0a955e797}\label{a09284_aec7d0e017944ac9d69ca3dd0a955e797}} 
bool \hyperlink{a09284_aec7d0e017944ac9d69ca3dd0a955e797}{operator$<$=} (const \hyperlink{a09284}{Timer} \&t2) const
\begin{DoxyCompactList}\small\item\em Compare timer values. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a09284_a4624056cf57b06b37aa90afbc49e7e3c}\label{a09284_a4624056cf57b06b37aa90afbc49e7e3c}} 
bool \hyperlink{a09284_a4624056cf57b06b37aa90afbc49e7e3c}{operator$>$=} (const \hyperlink{a09284}{Timer} \&t2) const
\begin{DoxyCompactList}\small\item\em Compare timer values. \end{DoxyCompactList}\end{DoxyCompactItemize}

\subsection*{Static Public Member Functions}
\begin{DoxyCompactItemize}
\item 
static std\+::string \hyperlink{a09284_a2c8f0e06e5011eab302725e64da1e913}{as\+\_\+string} (double \hyperlink{a09284_aa9b786d00041ac67cb23a5a83e2c21b7}{seconds}, \hyperlink{a09284_a129372ccc43d66a01dd92e635b8419fd}{Format} format=Automatic)
\end{DoxyCompactItemize}
\subsection*{Protected Types}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{a09284_ae6625e062942b87167c63f30f8f7e011}\label{a09284_ae6625e062942b87167c63f30f8f7e011}} 
enum \{ {\bfseries Invalid} = -\/1, 
{\bfseries Stopped} = 0, 
{\bfseries Running} = 1
 \}
\end{DoxyCompactItemize}
\subsection*{Protected Attributes}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{a09284_aa54775d02c0973d5793683801ad9418f}\label{a09284_aa54775d02c0973d5793683801ad9418f}} 
Timer\+Impl $\ast$ {\bfseries impl\+\_\+}
\item 
\mbox{\Hypertarget{a09284_a59d074876c2476fe756e8c5bb031fda2}\label{a09284_a59d074876c2476fe756e8c5bb031fda2}} 
enum Open\+Mesh\+::\+Utils\+::\+Timer\+:: \{ ... \}  {\bfseries state\+\_\+}
\end{DoxyCompactItemize}
\subsection*{Related Functions}
(Note that these are not member functions.) \begin{DoxyCompactItemize}
\item 
std\+::ostream \& \hyperlink{a09284_a48f6b3535fcd618dc0ffb43b6ebe6a01}{operator$<$$<$} (std\+::ostream \&\+\_\+o, const \hyperlink{a09284}{Timer} \&\+\_\+t)
\end{DoxyCompactItemize}


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

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



\subsection{Member Function Documentation}
\mbox{\Hypertarget{a09284_ab44e5c7c811608d5bb1b1c2ed01537f4}\label{a09284_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{\texorpdfstring{as\+\_\+string()}{as\_string()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily std\+::string Open\+Mesh\+::\+Utils\+::\+Timer\+::as\+\_\+string (\begin{DoxyParamCaption}\item[{\hyperlink{a09284_a129372ccc43d66a01dd92e635b8419fd}{Format}}]{format = {\ttfamily Automatic} }\end{DoxyParamCaption})}

Returns the measured time as a string. Use the format flags to specify a wanted resolution. \mbox{\Hypertarget{a09284_a2c8f0e06e5011eab302725e64da1e913}\label{a09284_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{\texorpdfstring{as\+\_\+string()}{as\_string()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily static std\+::string Open\+Mesh\+::\+Utils\+::\+Timer\+::as\+\_\+string (\begin{DoxyParamCaption}\item[{double}]{seconds,  }\item[{\hyperlink{a09284_a129372ccc43d66a01dd92e635b8419fd}{Format}}]{format = {\ttfamily Automatic} }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}

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

\subsection{Friends And Related Function Documentation}
\mbox{\Hypertarget{a09284_a48f6b3535fcd618dc0ffb43b6ebe6a01}\label{a09284_a48f6b3535fcd618dc0ffb43b6ebe6a01}} 
\index{Open\+Mesh\+::\+Utils\+::\+Timer@{Open\+Mesh\+::\+Utils\+::\+Timer}!operator$<$$<$@{operator$<$$<$}}
\index{operator$<$$<$@{operator$<$$<$}!Open\+Mesh\+::\+Utils\+::\+Timer@{Open\+Mesh\+::\+Utils\+::\+Timer}}
\subsubsection{\texorpdfstring{operator$<$$<$()}{operator<<()}}
{\footnotesize\ttfamily std\+::ostream \& operator$<$$<$ (\begin{DoxyParamCaption}\item[{std\+::ostream \&}]{\+\_\+o,  }\item[{const \hyperlink{a09284}{Timer} \&}]{\+\_\+t }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [related]}}

Write seconds to output stream. \hyperlink{a09284}{Timer} must be stopped before. 

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



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