\hypertarget{classcore_1_1_timer}{}\doxysection{core\+::Timer Class Reference}
\label{classcore_1_1_timer}\index{core::Timer@{core::Timer}}


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



Inheritance diagram for core\+::Timer\+:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=156pt]{classcore_1_1_timer__inherit__graph}
\end{center}
\end{figure}


Collaboration diagram for core\+::Timer\+:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=228pt]{classcore_1_1_timer__coll__graph}
\end{center}
\end{figure}
\doxysubsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\hyperlink{classcore_1_1_timer_aa12f319bab9c7a350244c4d47fe59de9}{Timer}} (\mbox{\hyperlink{classcore_1_1_e_poll}{E\+Poll}} \&\mbox{\hyperlink{classcore_1_1_socket_a3b0b139ac7da581f0d969f6ae9a0c97c}{e\+Poll}})
\item 
\mbox{\hyperlink{classcore_1_1_timer_a6ba8de81f8e3b26fd132e29230646024}{Timer}} (\mbox{\hyperlink{classcore_1_1_e_poll}{E\+Poll}} \&\mbox{\hyperlink{classcore_1_1_socket_a3b0b139ac7da581f0d969f6ae9a0c97c}{e\+Poll}}, double delay)
\item 
\mbox{\hyperlink{classcore_1_1_timer_a296204adfb7718388f9713e1679d3a2e}{$\sim$\+Timer}} ()
\item 
void \mbox{\hyperlink{classcore_1_1_timer_ac0a642cdcb76b7f995137162050d3d0b}{set\+Timer}} (double delay)
\item 
void \mbox{\hyperlink{classcore_1_1_timer_a8e063f46e89dac04364871e909ab940a}{clear\+Timer}} ()
\item 
double \mbox{\hyperlink{classcore_1_1_timer_a0df7f1ffc05529b45d6e13713bbc0209}{get\+Elapsed}} ()
\item 
double \mbox{\hyperlink{classcore_1_1_timer_afee1c871ce74e6b594bd6e64ad3cb576}{get\+Epoch}} ()
\end{DoxyCompactItemize}
\doxysubsection*{Protected Member Functions}
\begin{DoxyCompactItemize}
\item 
virtual void \mbox{\hyperlink{classcore_1_1_timer_ae51704ff08d985bbc30e3ff4c9b3c6ca}{on\+Timeout}} ()=0
\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
\mbox{\hyperlink{classcore_1_1_timer}{Timer}}

Set and trigger callback upon specified timeout.

The \mbox{\hyperlink{classcore_1_1_timer}{Timer}} is used to establish a timer using the timer socket interface. It cannot be instantiated directly but must be extended. 

\doxysubsection{Constructor \& Destructor Documentation}
\mbox{\Hypertarget{classcore_1_1_timer_aa12f319bab9c7a350244c4d47fe59de9}\label{classcore_1_1_timer_aa12f319bab9c7a350244c4d47fe59de9}} 
\index{core::Timer@{core::Timer}!Timer@{Timer}}
\index{Timer@{Timer}!core::Timer@{core::Timer}}
\doxysubsubsection{\texorpdfstring{Timer()}{Timer()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily core\+::\+Timer\+::\+Timer (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{classcore_1_1_e_poll}{E\+Poll}} \&}]{e\+Poll }\end{DoxyParamCaption})}

\mbox{\Hypertarget{classcore_1_1_timer_a6ba8de81f8e3b26fd132e29230646024}\label{classcore_1_1_timer_a6ba8de81f8e3b26fd132e29230646024}} 
\index{core::Timer@{core::Timer}!Timer@{Timer}}
\index{Timer@{Timer}!core::Timer@{core::Timer}}
\doxysubsubsection{\texorpdfstring{Timer()}{Timer()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily core\+::\+Timer\+::\+Timer (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{classcore_1_1_e_poll}{E\+Poll}} \&}]{e\+Poll,  }\item[{double}]{delay = {\ttfamily 0.0f} }\end{DoxyParamCaption})}

\mbox{\Hypertarget{classcore_1_1_timer_a296204adfb7718388f9713e1679d3a2e}\label{classcore_1_1_timer_a296204adfb7718388f9713e1679d3a2e}} 
\index{core::Timer@{core::Timer}!````~Timer@{$\sim$Timer}}
\index{````~Timer@{$\sim$Timer}!core::Timer@{core::Timer}}
\doxysubsubsection{\texorpdfstring{$\sim$Timer()}{~Timer()}}
{\footnotesize\ttfamily core\+::\+Timer\+::$\sim$\+Timer (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



\doxysubsection{Member Function Documentation}
\mbox{\Hypertarget{classcore_1_1_timer_a8e063f46e89dac04364871e909ab940a}\label{classcore_1_1_timer_a8e063f46e89dac04364871e909ab940a}} 
\index{core::Timer@{core::Timer}!clearTimer@{clearTimer}}
\index{clearTimer@{clearTimer}!core::Timer@{core::Timer}}
\doxysubsubsection{\texorpdfstring{clearTimer()}{clearTimer()}}
{\footnotesize\ttfamily void core\+::\+Timer\+::clear\+Timer (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}

Use the \mbox{\hyperlink{classcore_1_1_timer_a8e063f46e89dac04364871e909ab940a}{clear\+Timer()}} to unset the timer and return the timer to an idle state. \mbox{\Hypertarget{classcore_1_1_timer_a0df7f1ffc05529b45d6e13713bbc0209}\label{classcore_1_1_timer_a0df7f1ffc05529b45d6e13713bbc0209}} 
\index{core::Timer@{core::Timer}!getElapsed@{getElapsed}}
\index{getElapsed@{getElapsed}!core::Timer@{core::Timer}}
\doxysubsubsection{\texorpdfstring{getElapsed()}{getElapsed()}}
{\footnotesize\ttfamily double core\+::\+Timer\+::get\+Elapsed (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}

Use the \mbox{\hyperlink{classcore_1_1_timer_a0df7f1ffc05529b45d6e13713bbc0209}{get\+Elapsed()}} method to obtain the amount of time that has elapsed since the timer was set. \mbox{\Hypertarget{classcore_1_1_timer_afee1c871ce74e6b594bd6e64ad3cb576}\label{classcore_1_1_timer_afee1c871ce74e6b594bd6e64ad3cb576}} 
\index{core::Timer@{core::Timer}!getEpoch@{getEpoch}}
\index{getEpoch@{getEpoch}!core::Timer@{core::Timer}}
\doxysubsubsection{\texorpdfstring{getEpoch()}{getEpoch()}}
{\footnotesize\ttfamily double core\+::\+Timer\+::get\+Epoch (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}

\mbox{\Hypertarget{classcore_1_1_timer_ae51704ff08d985bbc30e3ff4c9b3c6ca}\label{classcore_1_1_timer_ae51704ff08d985bbc30e3ff4c9b3c6ca}} 
\index{core::Timer@{core::Timer}!onTimeout@{onTimeout}}
\index{onTimeout@{onTimeout}!core::Timer@{core::Timer}}
\doxysubsubsection{\texorpdfstring{onTimeout()}{onTimeout()}}
{\footnotesize\ttfamily virtual void core\+::\+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{classcore_1_1_timer_ac0a642cdcb76b7f995137162050d3d0b}\label{classcore_1_1_timer_ac0a642cdcb76b7f995137162050d3d0b}} 
\index{core::Timer@{core::Timer}!setTimer@{setTimer}}
\index{setTimer@{setTimer}!core::Timer@{core::Timer}}
\doxysubsubsection{\texorpdfstring{setTimer()}{setTimer()}}
{\footnotesize\ttfamily void core\+::\+Timer\+::set\+Timer (\begin{DoxyParamCaption}\item[{double}]{delay }\end{DoxyParamCaption})}

Use the \mbox{\hyperlink{classcore_1_1_timer_ac0a642cdcb76b7f995137162050d3d0b}{set\+Timer()}} method to set the time out value for timer. Setting the timer also starts the timer countdown. The \mbox{\hyperlink{classcore_1_1_timer_a8e063f46e89dac04364871e909ab940a}{clear\+Timer()}} method can be used to reset the timer without triggering the \mbox{\hyperlink{classcore_1_1_timer_ae51704ff08d985bbc30e3ff4c9b3c6ca}{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 
\mbox{\hyperlink{_timer_8h}{Timer.\+h}}\item 
\mbox{\hyperlink{_timer_8cpp}{Timer.\+cpp}}\end{DoxyCompactItemize}
