\hypertarget{class_b_m_a_timer}{}\section{B\+M\+A\+Timer Class Reference}
\label{class_b_m_a_timer}\index{B\+M\+A\+Timer@{B\+M\+A\+Timer}}


{\ttfamily \#include $<$B\+M\+A\+Timer.\+h$>$}



Inheritance diagram for B\+M\+A\+Timer\+:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=246pt]{class_b_m_a_timer__inherit__graph}
\end{center}
\end{figure}


Collaboration diagram for B\+M\+A\+Timer\+:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=300pt]{class_b_m_a_timer__coll__graph}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{class_b_m_a_timer_a23b70762f6bca2ec9eee5642cda6e915}\label{class_b_m_a_timer_a23b70762f6bca2ec9eee5642cda6e915}} 
{\bfseries B\+M\+A\+Timer} (\hyperlink{class_b_m_a_e_poll}{B\+M\+A\+E\+Poll} \&e\+Poll)
\item 
\mbox{\Hypertarget{class_b_m_a_timer_a52096d26eabfb5a938091d6160705b43}\label{class_b_m_a_timer_a52096d26eabfb5a938091d6160705b43}} 
{\bfseries B\+M\+A\+Timer} (\hyperlink{class_b_m_a_e_poll}{B\+M\+A\+E\+Poll} \&e\+Poll, double delay)
\item 
void \hyperlink{class_b_m_a_timer_acbfec79cd4b7834e35c05cab6ffdf0b1}{set\+Timer} (double delay)
\item 
void \hyperlink{class_b_m_a_timer_abc80e4ca7b8820ffe50e48e51f625b6b}{clear\+Timer} ()
\item 
double \hyperlink{class_b_m_a_timer_a59cd5143def2b1bfeaff7c83b3191052}{get\+Elapsed} ()
\item 
\mbox{\Hypertarget{class_b_m_a_timer_a6c7bdb27dc350fd39c0090708031a38f}\label{class_b_m_a_timer_a6c7bdb27dc350fd39c0090708031a38f}} 
double {\bfseries get\+Epoch} ()
\end{DoxyCompactItemize}
\subsection*{Protected Member Functions}
\begin{DoxyCompactItemize}
\item 
virtual void \hyperlink{class_b_m_a_timer_aa80b19263f18acd2ce11f4e78c7a856b}{on\+Timeout} ()=0
\end{DoxyCompactItemize}


\subsection{Detailed Description}
\hyperlink{class_b_m_a_timer}{B\+M\+A\+Timer}

Set and trigger callback upon specified timeout.

The \hyperlink{class_b_m_a_timer}{B\+M\+A\+Timer} is used to establish a timer using the timer socket interface. It cannot be instantiated directly but must be extended. 

\subsection{Member Function Documentation}
\mbox{\Hypertarget{class_b_m_a_timer_abc80e4ca7b8820ffe50e48e51f625b6b}\label{class_b_m_a_timer_abc80e4ca7b8820ffe50e48e51f625b6b}} 
\index{B\+M\+A\+Timer@{B\+M\+A\+Timer}!clear\+Timer@{clear\+Timer}}
\index{clear\+Timer@{clear\+Timer}!B\+M\+A\+Timer@{B\+M\+A\+Timer}}
\subsubsection{\texorpdfstring{clear\+Timer()}{clearTimer()}}
{\footnotesize\ttfamily void B\+M\+A\+Timer\+::clear\+Timer (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}

Use the \hyperlink{class_b_m_a_timer_abc80e4ca7b8820ffe50e48e51f625b6b}{clear\+Timer()} to unset the timer and return the timer to an idle state. \mbox{\Hypertarget{class_b_m_a_timer_a59cd5143def2b1bfeaff7c83b3191052}\label{class_b_m_a_timer_a59cd5143def2b1bfeaff7c83b3191052}} 
\index{B\+M\+A\+Timer@{B\+M\+A\+Timer}!get\+Elapsed@{get\+Elapsed}}
\index{get\+Elapsed@{get\+Elapsed}!B\+M\+A\+Timer@{B\+M\+A\+Timer}}
\subsubsection{\texorpdfstring{get\+Elapsed()}{getElapsed()}}
{\footnotesize\ttfamily double B\+M\+A\+Timer\+::get\+Elapsed (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}

Use the \hyperlink{class_b_m_a_timer_a59cd5143def2b1bfeaff7c83b3191052}{get\+Elapsed()} method to obtain the amount of time that has elapsed since the timer was set. \mbox{\Hypertarget{class_b_m_a_timer_aa80b19263f18acd2ce11f4e78c7a856b}\label{class_b_m_a_timer_aa80b19263f18acd2ce11f4e78c7a856b}} 
\index{B\+M\+A\+Timer@{B\+M\+A\+Timer}!on\+Timeout@{on\+Timeout}}
\index{on\+Timeout@{on\+Timeout}!B\+M\+A\+Timer@{B\+M\+A\+Timer}}
\subsubsection{\texorpdfstring{on\+Timeout()}{onTimeout()}}
{\footnotesize\ttfamily virtual void B\+M\+A\+Timer\+::on\+Timeout (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [protected]}, {\ttfamily [pure virtual]}}

This method is called when the time out occurs. \mbox{\Hypertarget{class_b_m_a_timer_acbfec79cd4b7834e35c05cab6ffdf0b1}\label{class_b_m_a_timer_acbfec79cd4b7834e35c05cab6ffdf0b1}} 
\index{B\+M\+A\+Timer@{B\+M\+A\+Timer}!set\+Timer@{set\+Timer}}
\index{set\+Timer@{set\+Timer}!B\+M\+A\+Timer@{B\+M\+A\+Timer}}
\subsubsection{\texorpdfstring{set\+Timer()}{setTimer()}}
{\footnotesize\ttfamily void B\+M\+A\+Timer\+::set\+Timer (\begin{DoxyParamCaption}\item[{double}]{delay }\end{DoxyParamCaption})}

Use the \hyperlink{class_b_m_a_timer_acbfec79cd4b7834e35c05cab6ffdf0b1}{set\+Timer()} method to set the time out value for timer. Setting the timer also starts the timer countdown. The \hyperlink{class_b_m_a_timer_abc80e4ca7b8820ffe50e48e51f625b6b}{clear\+Timer()} method can be used to reset the timer without triggering the \hyperlink{class_b_m_a_timer_aa80b19263f18acd2ce11f4e78c7a856b}{on\+Timeout()} callback.


\begin{DoxyParams}{Parameters}
{\em delay} & the amount of time in seconds to wait before trigering the on\+Timeout function. \\
\hline
\end{DoxyParams}


The documentation for this class was generated from the following files\+:\begin{DoxyCompactItemize}
\item 
/home/barant/\+Development/\+B\+M\+A/server\+\_\+core/\+Server\+Core/B\+M\+A\+Timer.\+h\item 
/home/barant/\+Development/\+B\+M\+A/server\+\_\+core/\+Server\+Core/B\+M\+A\+Timer.\+cpp\end{DoxyCompactItemize}
