\hypertarget{classXorpTimer}{
\section{XorpTimer Class Reference}
\label{classXorpTimer}\index{XorpTimer@{XorpTimer}}
}


\hyperlink{classXorpTimer}{XorpTimer} class.  




{\ttfamily \#include $<$timer.hh$>$}

\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
bool \hyperlink{classXorpTimer_a1b97d0c2bc74ff8aecc1b8c8a821d5d8}{scheduled} () const 
\item 
const \hyperlink{classTimeVal}{TimeVal} \& \hyperlink{classXorpTimer_ae42343f5fc6a273c13b41619e9fff69b}{expiry} () const 
\item 
bool \hyperlink{classXorpTimer_a9c79fe559fa8e12dea5d76ee2d798199}{time\_\-remaining} (\hyperlink{classTimeVal}{TimeVal} \&remain) const 
\begin{DoxyCompactList}\small\item\em Get \hyperlink{protocolthe-p}{the} remaining time until \hyperlink{protocolthe-p}{the} timer expires. \item\end{DoxyCompactList}\item 
\hypertarget{classXorpTimer_a5536bfab615ac290e8a53bc758b505be}{
void \hyperlink{classXorpTimer_a5536bfab615ac290e8a53bc758b505be}{schedule\_\-now} (int priority=XorpTask::PRIORITY\_\-DEFAULT)}
\label{classXorpTimer_a5536bfab615ac290e8a53bc758b505be}

\begin{DoxyCompactList}\small\item\em Expire \hyperlink{protocolthe-p}{the} \hyperlink{classXorpTimer}{XorpTimer} object when \hyperlink{protocolthe-p}{the} \hyperlink{classTimerList}{TimerList} is next run. \item\end{DoxyCompactList}\item 
\hypertarget{classXorpTimer_afae6856e9bc5323fa01a39f93fcee54e}{
void \hyperlink{classXorpTimer_afae6856e9bc5323fa01a39f93fcee54e}{schedule\_\-at} (const \hyperlink{classTimeVal}{TimeVal} \&when, int priority=XorpTask::PRIORITY\_\-DEFAULT)}
\label{classXorpTimer_afae6856e9bc5323fa01a39f93fcee54e}

\begin{DoxyCompactList}\small\item\em Schedule \hyperlink{protocolthe-p}{the} \hyperlink{classXorpTimer}{XorpTimer} object at a given time. \item\end{DoxyCompactList}\item 
\hypertarget{classXorpTimer_a27eb9c50b9655ce3b8d1b1248c3b2471}{
void \hyperlink{classXorpTimer_a27eb9c50b9655ce3b8d1b1248c3b2471}{schedule\_\-after} (const \hyperlink{classTimeVal}{TimeVal} \&wait, int priority=XorpTask::PRIORITY\_\-DEFAULT)}
\label{classXorpTimer_a27eb9c50b9655ce3b8d1b1248c3b2471}

\begin{DoxyCompactList}\small\item\em Schedule \hyperlink{protocolthe-p}{the} \hyperlink{classXorpTimer}{XorpTimer} object to expire in wait after \hyperlink{protocolthe-p}{the} current time. \item\end{DoxyCompactList}\item 
void \hyperlink{classXorpTimer_a090e0d7d56f3fdc59e1c2f28570d0cc7}{schedule\_\-after\_\-ms} (int ms, int priority=XorpTask::PRIORITY\_\-DEFAULT)
\begin{DoxyCompactList}\small\item\em Schedule \hyperlink{protocolthe-p}{the} \hyperlink{classXorpTimer}{XorpTimer} object. \item\end{DoxyCompactList}\item 
void \hyperlink{classXorpTimer_a59933cb598bd0ce5061b4af7200e9d22}{reschedule\_\-after} (const \hyperlink{classTimeVal}{TimeVal} \&wait)
\begin{DoxyCompactList}\small\item\em Reschedule \hyperlink{protocolthe-p}{the} \hyperlink{classXorpTimer}{XorpTimer} object. \item\end{DoxyCompactList}\item 
void \hyperlink{classXorpTimer_a325eabb0f27147aa00d3e693cbd13ef2}{reschedule\_\-after\_\-ms} (int ms)
\begin{DoxyCompactList}\small\item\em Reschedule \hyperlink{protocolthe-p}{the} \hyperlink{classXorpTimer}{XorpTimer} object. \item\end{DoxyCompactList}\item 
void \hyperlink{classXorpTimer_aa71bace1e2a478819d7b67d542b77c12}{unschedule} ()
\begin{DoxyCompactList}\small\item\em Unschedule \hyperlink{protocolthe-p}{the} \hyperlink{classXorpTimer}{XorpTimer} object. \item\end{DoxyCompactList}\item 
\hypertarget{classXorpTimer_a08bafbdb7c5d4ad17d77b39de5b18970}{
void \hyperlink{classXorpTimer_a08bafbdb7c5d4ad17d77b39de5b18970}{clear} ()}
\label{classXorpTimer_a08bafbdb7c5d4ad17d77b39de5b18970}

\begin{DoxyCompactList}\small\item\em Release reference to underlying state. \item\end{DoxyCompactList}\item 
\hypertarget{classXorpTimer_a3532a001e6a07c99e39a2f17f7394cef}{
{\bfseries XorpTimer} (\hyperlink{classTimerList}{TimerList} $\ast$list, BasicTimerCallback cb)}
\label{classXorpTimer_a3532a001e6a07c99e39a2f17f7394cef}

\item 
\hypertarget{classXorpTimer_a5a26116ae4f63f180fdeacb5bdf62052}{
{\bfseries XorpTimer} (const \hyperlink{classXorpTimer}{XorpTimer} \&)}
\label{classXorpTimer_a5a26116ae4f63f180fdeacb5bdf62052}

\item 
\hypertarget{classXorpTimer_ae54769cb5e03ab67ddd17e7c822db74c}{
\hyperlink{classXorpTimer}{XorpTimer} \& {\bfseries operator=} (const \hyperlink{classXorpTimer}{XorpTimer} \&)}
\label{classXorpTimer_ae54769cb5e03ab67ddd17e7c822db74c}

\item 
\hypertarget{classXorpTimer_acc444512d104b2d373f3de5b60940d3b}{
\hyperlink{classTimerNode}{TimerNode} $\ast$ {\bfseries node} () const }
\label{classXorpTimer_acc444512d104b2d373f3de5b60940d3b}

\end{DoxyCompactItemize}
\subsection*{Private Member Functions}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classXorpTimer_ac05452c42b14592df60560d98c9d87a6}{
{\bfseries XorpTimer} (\hyperlink{classTimerNode}{TimerNode} $\ast$n)}
\label{classXorpTimer_ac05452c42b14592df60560d98c9d87a6}

\end{DoxyCompactItemize}
\subsection*{Private Attributes}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classXorpTimer_a4f65d283391a09d63c4dd3e680ec94ac}{
\hyperlink{classTimerNode}{TimerNode} $\ast$ {\bfseries \_\-node}}
\label{classXorpTimer_a4f65d283391a09d63c4dd3e680ec94ac}

\end{DoxyCompactItemize}
\subsection*{Friends}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classXorpTimer_a37bed02599bfb687e98de9635dc58d5d}{
class \hyperlink{classXorpTimer_a37bed02599bfb687e98de9635dc58d5d}{TimerList}}
\label{classXorpTimer_a37bed02599bfb687e98de9635dc58d5d}

\end{DoxyCompactItemize}


\subsection{Detailed Description}
\hyperlink{classXorpTimer}{XorpTimer} class. Timers allow callbacks to be made at a specific time in \hyperlink{protocolthe-p}{the} future. They are ordinarily created via \hyperlink{classTimerList}{TimerList} methods, and they must be associated with an \hyperlink{classTimerList}{TimerList} object in order to be runnable.

\begin{DoxySeeAlso}{See also}
\hyperlink{classTimerList}{TimerList} 
\end{DoxySeeAlso}


\subsection{Member Function Documentation}
\hypertarget{classXorpTimer_ae42343f5fc6a273c13b41619e9fff69b}{
\index{XorpTimer@{XorpTimer}!expiry@{expiry}}
\index{expiry@{expiry}!XorpTimer@{XorpTimer}}
\subsubsection[{expiry}]{\setlength{\rightskip}{0pt plus 5cm}const {\bf TimeVal} \& XorpTimer::expiry (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classXorpTimer_ae42343f5fc6a273c13b41619e9fff69b}
\begin{DoxyReturn}{Returns}
\hyperlink{protocolthe-p}{the} expiry time of \hyperlink{protocolthe-p}{the} \hyperlink{classXorpTimer}{XorpTimer} 
\end{DoxyReturn}
\hypertarget{classXorpTimer_a59933cb598bd0ce5061b4af7200e9d22}{
\index{XorpTimer@{XorpTimer}!reschedule\_\-after@{reschedule\_\-after}}
\index{reschedule\_\-after@{reschedule\_\-after}!XorpTimer@{XorpTimer}}
\subsubsection[{reschedule\_\-after}]{\setlength{\rightskip}{0pt plus 5cm}void XorpTimer::reschedule\_\-after (
\begin{DoxyParamCaption}
\item[{const {\bf TimeVal} \&}]{wait}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classXorpTimer_a59933cb598bd0ce5061b4af7200e9d22}


Reschedule \hyperlink{protocolthe-p}{the} \hyperlink{classXorpTimer}{XorpTimer} object. 


\begin{DoxyParams}{Parameters}
{\em wait} & time from \hyperlink{protocolthe-p}{the} most recent expiry. \\
\hline
\end{DoxyParams}
\hypertarget{classXorpTimer_a325eabb0f27147aa00d3e693cbd13ef2}{
\index{XorpTimer@{XorpTimer}!reschedule\_\-after\_\-ms@{reschedule\_\-after\_\-ms}}
\index{reschedule\_\-after\_\-ms@{reschedule\_\-after\_\-ms}!XorpTimer@{XorpTimer}}
\subsubsection[{reschedule\_\-after\_\-ms}]{\setlength{\rightskip}{0pt plus 5cm}void XorpTimer::reschedule\_\-after\_\-ms (
\begin{DoxyParamCaption}
\item[{int}]{ms}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classXorpTimer_a325eabb0f27147aa00d3e693cbd13ef2}


Reschedule \hyperlink{protocolthe-p}{the} \hyperlink{classXorpTimer}{XorpTimer} object. 


\begin{DoxyParams}{Parameters}
{\em ms} & milliseconds from \hyperlink{protocolthe-p}{the} most recent expiry. \\
\hline
\end{DoxyParams}
\hypertarget{classXorpTimer_a090e0d7d56f3fdc59e1c2f28570d0cc7}{
\index{XorpTimer@{XorpTimer}!schedule\_\-after\_\-ms@{schedule\_\-after\_\-ms}}
\index{schedule\_\-after\_\-ms@{schedule\_\-after\_\-ms}!XorpTimer@{XorpTimer}}
\subsubsection[{schedule\_\-after\_\-ms}]{\setlength{\rightskip}{0pt plus 5cm}void XorpTimer::schedule\_\-after\_\-ms (
\begin{DoxyParamCaption}
\item[{int}]{ms, }
\item[{int}]{priority = {\ttfamily XorpTask::PRIORITY\_\-DEFAULT}}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classXorpTimer_a090e0d7d56f3fdc59e1c2f28570d0cc7}


Schedule \hyperlink{protocolthe-p}{the} \hyperlink{classXorpTimer}{XorpTimer} object. 


\begin{DoxyParams}{Parameters}
{\em ms} & milliseconds from \hyperlink{protocolthe-p}{the} current time. \\
\hline
\end{DoxyParams}
\hypertarget{classXorpTimer_a1b97d0c2bc74ff8aecc1b8c8a821d5d8}{
\index{XorpTimer@{XorpTimer}!scheduled@{scheduled}}
\index{scheduled@{scheduled}!XorpTimer@{XorpTimer}}
\subsubsection[{scheduled}]{\setlength{\rightskip}{0pt plus 5cm}bool XorpTimer::scheduled (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classXorpTimer_a1b97d0c2bc74ff8aecc1b8c8a821d5d8}
\begin{DoxyReturn}{Returns}
true if \hyperlink{protocolthe-p}{the} timer has been scheduled, and \hyperlink{protocolthe-p}{the} callback associated with this timer has not been called yet. 
\end{DoxyReturn}
\hypertarget{classXorpTimer_a9c79fe559fa8e12dea5d76ee2d798199}{
\index{XorpTimer@{XorpTimer}!time\_\-remaining@{time\_\-remaining}}
\index{time\_\-remaining@{time\_\-remaining}!XorpTimer@{XorpTimer}}
\subsubsection[{time\_\-remaining}]{\setlength{\rightskip}{0pt plus 5cm}bool XorpTimer::time\_\-remaining (
\begin{DoxyParamCaption}
\item[{{\bf TimeVal} \&}]{remain}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classXorpTimer_a9c79fe559fa8e12dea5d76ee2d798199}


Get \hyperlink{protocolthe-p}{the} remaining time until \hyperlink{protocolthe-p}{the} timer expires. 


\begin{DoxyParams}{Parameters}
{\em remain} & \hyperlink{protocolthe-p}{the} return-\/by-\/reference value with \hyperlink{protocolthe-p}{the} remaining time until \hyperlink{protocolthe-p}{the} timer expires. If \hyperlink{protocolthe-p}{the} current time is beyond \hyperlink{protocolthe-p}{the} expire time (e.g., if we are behind schedule with \hyperlink{protocolthe-p}{the} timer processing), \hyperlink{protocolthe-p}{the} return time is zero. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
true if \hyperlink{protocolthe-p}{the} remaining time has meaningful value (e.g., if timer was scheduled), otherwise false. 
\end{DoxyReturn}
\hypertarget{classXorpTimer_aa71bace1e2a478819d7b67d542b77c12}{
\index{XorpTimer@{XorpTimer}!unschedule@{unschedule}}
\index{unschedule@{unschedule}!XorpTimer@{XorpTimer}}
\subsubsection[{unschedule}]{\setlength{\rightskip}{0pt plus 5cm}void XorpTimer::unschedule (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classXorpTimer_aa71bace1e2a478819d7b67d542b77c12}


Unschedule \hyperlink{protocolthe-p}{the} \hyperlink{classXorpTimer}{XorpTimer} object. 

The \hyperlink{classXorpTimer}{XorpTimer} callback is not invoked. 

The documentation for this class was generated from the following file:\begin{DoxyCompactItemize}
\item 
/home/greearb/git/xorp.ct.github/xorp/libxorp/timer.hh\end{DoxyCompactItemize}
