\hypertarget{TSS_8c}{
\section{TSS.c File Reference}
\label{TSS_8c}\index{TSS.c@{TSS.c}}
}
Implements routines that manipulate a timespec structure. 

{\tt \#include $<$stdlib.h$>$}\par
{\tt \#include $<$time.h$>$}\par
{\tt \#include \char`\"{}IPBS/TSS.h\char`\"{}}\par
{\tt \#include \char`\"{}IPBS/WCT.h\char`\"{}}\par
{\tt \#include \char`\"{}WCT\_\-pvtdefs.ih\char`\"{}}\par


Include dependency graph for TSS.c:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=237pt]{TSS_8c__incl}
\end{center}
\end{figure}
\subsection*{Defines}
\begin{CompactItemize}
\item 
\hypertarget{TSS_8c_a0}{
\#define \hyperlink{TSS_8c_a0}{get\_\-time}()~WCT\_\-\_\-utb\_\-get()}
\label{TSS_8c_a0}

\begin{CompactList}\small\item\em Gets the time in the local representation. \item\end{CompactList}\item 
\hypertarget{TSS_8c_a1}{
\#define \hyperlink{TSS_8c_a1}{NSECS\_\-IN\_\-A\_\-SECOND}~1000000000ll}
\label{TSS_8c_a1}

\begin{CompactList}\small\item\em Convenience symbol for a billion. \item\end{CompactList}\end{CompactItemize}
\subsection*{Functions}
\begin{CompactItemize}
\item 
timespec \hyperlink{TSS_8c_a2}{TSS\_\-nsecx\-TOtod\-Add} (long long int delta)
\begin{CompactList}\small\item\em Computes the time specification by adding a number of nanoseconds to the current time. \item\end{CompactList}\item 
timespec \hyperlink{TSS_8c_a3}{TSS\_\-nsecs\-TOtod\-Add} (unsigned int delta)
\begin{CompactList}\small\item\em Computes the time specification by adding a number of nanoseconds to the current time. \item\end{CompactList}\item 
timespec \hyperlink{TSS_8c_a4}{TSS\_\-usecs\-TOtod\-Add} (unsigned int delta)
\begin{CompactList}\small\item\em Computes the time specification by adding a number of microseconds to the current time. \item\end{CompactList}\item 
timespec \hyperlink{TSS_8c_a5}{TSS\_\-secs\-TOtod\-Add} (unsigned int delta)
\begin{CompactList}\small\item\em Computes the time specification by adding a number of seconds to the current time. \item\end{CompactList}\item 
timespec \hyperlink{TSS_8c_a6}{TSS\_\-from\_\-wct} (\hyperlink{WCT_8h_a11}{WCT\_\-time} wct)
\begin{CompactList}\small\item\em Converts a Wall Clock Time to a struct timespec. \item\end{CompactList}\end{CompactItemize}


\subsection{Detailed Description}
Implements routines that manipulate a timespec structure. 

\begin{Desc}
\item[Author:]JJRussell - \href{mailto:russell@slac.stanford.edu}{\tt russell@slac.stanford.edu}\end{Desc}


\footnotesize\begin{verbatim}   CVS $Id: TSS.c,v 1.1.1.1 2006/02/10 21:45:34 saxton Exp $
\end{verbatim}
\normalsize


A timespec structure is a standard structure found in the \char`\"{}C\char`\"{}/Unix world. It represents time as two fields in a structure, a seconds field and a microseconds field. Performing simple operations, such as addition and subtraction, is not completely trivial, so this file provides a set of standard manipulation routines.

\subsection{Function Documentation}
\hypertarget{TSS_8c_a6}{
\index{TSS.c@{TSS.c}!TSS_from_wct@{TSS\_\-from\_\-wct}}
\index{TSS_from_wct@{TSS\_\-from\_\-wct}!TSS.c@{TSS.c}}
\subsubsection[TSS\_\-from\_\-wct]{\setlength{\rightskip}{0pt plus 5cm}struct timespec TSS\_\-from\_\-wct (\hyperlink{WCT_8h_a11}{WCT\_\-time} {\em wct})}}
\label{TSS_8c_a6}


Converts a Wall Clock Time to a struct timespec. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em wct}]The Wall Clock Time to convert \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]The Time\-Out Value\end{Desc}
\hypertarget{TSS_8c_a3}{
\index{TSS.c@{TSS.c}!TSS_nsecsTOtodAdd@{TSS\_\-nsecsTOtodAdd}}
\index{TSS_nsecsTOtodAdd@{TSS\_\-nsecsTOtodAdd}!TSS.c@{TSS.c}}
\subsubsection[TSS\_\-nsecsTOtodAdd]{\setlength{\rightskip}{0pt plus 5cm}struct timespec TSS\_\-nsecs\-TOtod\-Add (unsigned int {\em delta})}}
\label{TSS_8c_a3}


Computes the time specification by adding a number of nanoseconds to the current time. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em delta}]The number of microeconds to add to the current time. \end{description}
\end{Desc}
\begin{Desc}
\item[Return values:]
\begin{description}
\item[{\em The}]new time returned as a timespec structure.\end{description}
\end{Desc}
\hypertarget{TSS_8c_a2}{
\index{TSS.c@{TSS.c}!TSS_nsecxTOtodAdd@{TSS\_\-nsecxTOtodAdd}}
\index{TSS_nsecxTOtodAdd@{TSS\_\-nsecxTOtodAdd}!TSS.c@{TSS.c}}
\subsubsection[TSS\_\-nsecxTOtodAdd]{\setlength{\rightskip}{0pt plus 5cm}struct timespec TSS\_\-nsecx\-TOtod\-Add (long long int {\em delta})}}
\label{TSS_8c_a2}


Computes the time specification by adding a number of nanoseconds to the current time. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em delta}]The number of microeconds to add to the current time. \end{description}
\end{Desc}
\begin{Desc}
\item[Return values:]
\begin{description}
\item[{\em The}]new time returned as a timespec structure.\end{description}
\end{Desc}
\hypertarget{TSS_8c_a5}{
\index{TSS.c@{TSS.c}!TSS_secsTOtodAdd@{TSS\_\-secsTOtodAdd}}
\index{TSS_secsTOtodAdd@{TSS\_\-secsTOtodAdd}!TSS.c@{TSS.c}}
\subsubsection[TSS\_\-secsTOtodAdd]{\setlength{\rightskip}{0pt plus 5cm}struct timespec TSS\_\-secs\-TOtod\-Add (unsigned int {\em delta})}}
\label{TSS_8c_a5}


Computes the time specification by adding a number of seconds to the current time. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em delta}]The number of seconds to add to the current time. \end{description}
\end{Desc}
\begin{Desc}
\item[Return values:]
\begin{description}
\item[{\em The}]new time returned as a timespec structure.\end{description}
\end{Desc}
\hypertarget{TSS_8c_a4}{
\index{TSS.c@{TSS.c}!TSS_usecsTOtodAdd@{TSS\_\-usecsTOtodAdd}}
\index{TSS_usecsTOtodAdd@{TSS\_\-usecsTOtodAdd}!TSS.c@{TSS.c}}
\subsubsection[TSS\_\-usecsTOtodAdd]{\setlength{\rightskip}{0pt plus 5cm}struct timespec TSS\_\-usecs\-TOtod\-Add (unsigned int {\em delta})}}
\label{TSS_8c_a4}


Computes the time specification by adding a number of microseconds to the current time. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em delta}]The number of microeconds to add to the current time. \end{description}
\end{Desc}
\begin{Desc}
\item[Return values:]
\begin{description}
\item[{\em The}]new time returned as a timespec structure.\end{description}
\end{Desc}
