95 lines
5.0 KiB
TeX
95 lines
5.0 KiB
TeX
\hypertarget{classcore_1_1Timer}{}\section{core\+:\+:Timer Class Reference}
|
|
\label{classcore_1_1Timer}\index{core\+::\+Timer@{core\+::\+Timer}}
|
|
|
|
|
|
{\ttfamily \#include $<$Timer.\+h$>$}
|
|
|
|
|
|
|
|
Inheritance diagram for core\+:\+:Timer\+:\nopagebreak
|
|
\begin{figure}[H]
|
|
\begin{center}
|
|
\leavevmode
|
|
\includegraphics[width=152pt]{classcore_1_1Timer__inherit__graph}
|
|
\end{center}
|
|
\end{figure}
|
|
|
|
|
|
Collaboration diagram for core\+:\+:Timer\+:\nopagebreak
|
|
\begin{figure}[H]
|
|
\begin{center}
|
|
\leavevmode
|
|
\includegraphics[width=217pt]{classcore_1_1Timer__coll__graph}
|
|
\end{center}
|
|
\end{figure}
|
|
\subsection*{Public Member Functions}
|
|
\begin{DoxyCompactItemize}
|
|
\item
|
|
\mbox{\Hypertarget{classcore_1_1Timer_aa12f319bab9c7a350244c4d47fe59de9}\label{classcore_1_1Timer_aa12f319bab9c7a350244c4d47fe59de9}}
|
|
{\bfseries Timer} (\hyperlink{classcore_1_1EPoll}{E\+Poll} \&e\+Poll)
|
|
\item
|
|
\mbox{\Hypertarget{classcore_1_1Timer_a6ba8de81f8e3b26fd132e29230646024}\label{classcore_1_1Timer_a6ba8de81f8e3b26fd132e29230646024}}
|
|
{\bfseries Timer} (\hyperlink{classcore_1_1EPoll}{E\+Poll} \&e\+Poll, double delay)
|
|
\item
|
|
void \hyperlink{classcore_1_1Timer_ac0a642cdcb76b7f995137162050d3d0b}{set\+Timer} (double delay)
|
|
\item
|
|
void \hyperlink{classcore_1_1Timer_a8e063f46e89dac04364871e909ab940a}{clear\+Timer} ()
|
|
\item
|
|
double \hyperlink{classcore_1_1Timer_a0df7f1ffc05529b45d6e13713bbc0209}{get\+Elapsed} ()
|
|
\item
|
|
\mbox{\Hypertarget{classcore_1_1Timer_afee1c871ce74e6b594bd6e64ad3cb576}\label{classcore_1_1Timer_afee1c871ce74e6b594bd6e64ad3cb576}}
|
|
double {\bfseries get\+Epoch} ()
|
|
\end{DoxyCompactItemize}
|
|
\subsection*{Protected Member Functions}
|
|
\begin{DoxyCompactItemize}
|
|
\item
|
|
virtual void \hyperlink{classcore_1_1Timer_ae51704ff08d985bbc30e3ff4c9b3c6ca}{on\+Timeout} ()=0
|
|
\end{DoxyCompactItemize}
|
|
|
|
|
|
\subsection{Detailed Description}
|
|
\hyperlink{classcore_1_1Timer}{Timer}
|
|
|
|
Set and trigger callback upon specified timeout.
|
|
|
|
The \hyperlink{classcore_1_1Timer}{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{classcore_1_1Timer_a8e063f46e89dac04364871e909ab940a}\label{classcore_1_1Timer_a8e063f46e89dac04364871e909ab940a}}
|
|
\index{core\+::\+Timer@{core\+::\+Timer}!clear\+Timer@{clear\+Timer}}
|
|
\index{clear\+Timer@{clear\+Timer}!core\+::\+Timer@{core\+::\+Timer}}
|
|
\subsubsection{\texorpdfstring{clear\+Timer()}{clearTimer()}}
|
|
{\footnotesize\ttfamily void core\+::\+Timer\+::clear\+Timer (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}
|
|
|
|
Use the \hyperlink{classcore_1_1Timer_a8e063f46e89dac04364871e909ab940a}{clear\+Timer()} to unset the timer and return the timer to an idle state. \mbox{\Hypertarget{classcore_1_1Timer_a0df7f1ffc05529b45d6e13713bbc0209}\label{classcore_1_1Timer_a0df7f1ffc05529b45d6e13713bbc0209}}
|
|
\index{core\+::\+Timer@{core\+::\+Timer}!get\+Elapsed@{get\+Elapsed}}
|
|
\index{get\+Elapsed@{get\+Elapsed}!core\+::\+Timer@{core\+::\+Timer}}
|
|
\subsubsection{\texorpdfstring{get\+Elapsed()}{getElapsed()}}
|
|
{\footnotesize\ttfamily double core\+::\+Timer\+::get\+Elapsed (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}
|
|
|
|
Use the \hyperlink{classcore_1_1Timer_a0df7f1ffc05529b45d6e13713bbc0209}{get\+Elapsed()} method to obtain the amount of time that has elapsed since the timer was set. \mbox{\Hypertarget{classcore_1_1Timer_ae51704ff08d985bbc30e3ff4c9b3c6ca}\label{classcore_1_1Timer_ae51704ff08d985bbc30e3ff4c9b3c6ca}}
|
|
\index{core\+::\+Timer@{core\+::\+Timer}!on\+Timeout@{on\+Timeout}}
|
|
\index{on\+Timeout@{on\+Timeout}!core\+::\+Timer@{core\+::\+Timer}}
|
|
\subsubsection{\texorpdfstring{on\+Timeout()}{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_1Timer_ac0a642cdcb76b7f995137162050d3d0b}\label{classcore_1_1Timer_ac0a642cdcb76b7f995137162050d3d0b}}
|
|
\index{core\+::\+Timer@{core\+::\+Timer}!set\+Timer@{set\+Timer}}
|
|
\index{set\+Timer@{set\+Timer}!core\+::\+Timer@{core\+::\+Timer}}
|
|
\subsubsection{\texorpdfstring{set\+Timer()}{setTimer()}}
|
|
{\footnotesize\ttfamily void core\+::\+Timer\+::set\+Timer (\begin{DoxyParamCaption}\item[{double}]{delay }\end{DoxyParamCaption})}
|
|
|
|
Use the \hyperlink{classcore_1_1Timer_ac0a642cdcb76b7f995137162050d3d0b}{set\+Timer()} method to set the time out value for timer. Setting the timer also starts the timer countdown. The \hyperlink{classcore_1_1Timer_a8e063f46e89dac04364871e909ab940a}{clear\+Timer()} method can be used to reset the timer without triggering the \hyperlink{classcore_1_1Timer_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
|
|
Timer.\+h\item
|
|
Timer.\+cpp\end{DoxyCompactItemize}
|